Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #11494 from t895/orientation-jank
Android: Rewrite Wii system updates in Kotlin
- Loading branch information
Showing
14 changed files
with
384 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
...g/dolphinemu/dolphinemu/features/sysupdate/ui/OnlineUpdateRegionSelectDialogFragment.java
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
...org/dolphinemu/dolphinemu/features/sysupdate/ui/OnlineUpdateRegionSelectDialogFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-or-later | ||
|
|
||
| package org.dolphinemu.dolphinemu.features.sysupdate.ui | ||
|
|
||
| import android.app.Dialog | ||
| import android.content.DialogInterface | ||
| import android.os.Bundle | ||
| import androidx.fragment.app.DialogFragment | ||
| import androidx.lifecycle.ViewModelProvider | ||
| import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
| import org.dolphinemu.dolphinemu.R | ||
|
|
||
| class OnlineUpdateRegionSelectDialogFragment : DialogFragment() { | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
| val items = arrayOf( | ||
| getString(R.string.country_europe), | ||
| getString(R.string.country_japan), | ||
| getString(R.string.country_korea), | ||
| getString(R.string.country_usa) | ||
| ) | ||
| val checkedItem = -1 | ||
| return MaterialAlertDialogBuilder(requireContext()) | ||
| .setTitle(R.string.region_select_title) | ||
| .setSingleChoiceItems(items, checkedItem) { _: DialogInterface?, which: Int -> | ||
| val viewModel = | ||
| ViewModelProvider(requireActivity())[SystemUpdateViewModel::class.java] | ||
| viewModel.region = which | ||
| SystemUpdateProgressBarDialogFragment().show( | ||
| parentFragmentManager, | ||
| SystemUpdateProgressBarDialogFragment.TAG | ||
| ) | ||
| dismiss() | ||
| } | ||
| .create() | ||
| } | ||
|
|
||
| companion object { | ||
| const val TAG = "OnlineUpdateRegionSelectDialogFragment" | ||
| } | ||
| } |
34 changes: 0 additions & 34 deletions
34
...org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemMenuNotInstalledDialogFragment.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
...a/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemMenuNotInstalledDialogFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-or-later | ||
|
|
||
| package org.dolphinemu.dolphinemu.features.sysupdate.ui | ||
|
|
||
| import android.app.Dialog | ||
| import android.content.DialogInterface | ||
| import android.os.Bundle | ||
| import androidx.fragment.app.DialogFragment | ||
| import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
| import org.dolphinemu.dolphinemu.R | ||
|
|
||
| class SystemMenuNotInstalledDialogFragment : DialogFragment() { | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
| return MaterialAlertDialogBuilder(requireContext()) | ||
| .setTitle(R.string.system_menu_not_installed_title) | ||
| .setMessage(R.string.system_menu_not_installed_message) | ||
| .setPositiveButton(R.string.yes) { _: DialogInterface?, _: Int -> | ||
| OnlineUpdateRegionSelectDialogFragment().show( | ||
| parentFragmentManager, | ||
| OnlineUpdateRegionSelectDialogFragment.TAG | ||
| ) | ||
| dismiss() | ||
| } | ||
| .setNegativeButton(R.string.no) { _: DialogInterface?, _: Int -> dismiss() } | ||
| .create() | ||
| } | ||
|
|
||
| companion object { | ||
| const val TAG = "SystemMenuNotInstalledDialogFragment" | ||
| } | ||
| } |
133 changes: 0 additions & 133 deletions
133
...rg/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateProgressBarDialogFragment.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.