diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/OnlineUpdateRegionSelectDialogFragment.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/OnlineUpdateRegionSelectDialogFragment.kt index 1e3b7235da..ef41c2a034 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/OnlineUpdateRegionSelectDialogFragment.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/OnlineUpdateRegionSelectDialogFragment.kt @@ -27,10 +27,14 @@ class OnlineUpdateRegionSelectDialogFragment : DialogFragment() { viewModel.region = which SystemUpdateProgressBarDialogFragment().show( parentFragmentManager, - "OnlineUpdateProgressBarDialogFragment" + SystemUpdateProgressBarDialogFragment.TAG ) dismiss() } .create() } + + companion object { + const val TAG = "OnlineUpdateRegionSelectDialogFragment" + } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemMenuNotInstalledDialogFragment.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemMenuNotInstalledDialogFragment.kt index 396c60b8d8..9dfb328738 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemMenuNotInstalledDialogFragment.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemMenuNotInstalledDialogFragment.kt @@ -17,11 +17,15 @@ class SystemMenuNotInstalledDialogFragment : DialogFragment() { .setPositiveButton(R.string.yes) { _: DialogInterface?, _: Int -> OnlineUpdateRegionSelectDialogFragment().show( parentFragmentManager, - "OnlineUpdateRegionSelectDialogFragment" + OnlineUpdateRegionSelectDialogFragment.TAG ) dismiss() } .setNegativeButton(R.string.no) { _: DialogInterface?, _: Int -> dismiss() } .create() } + + companion object { + const val TAG = "SystemMenuNotInstalledDialogFragment" + } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateProgressBarDialogFragment.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateProgressBarDialogFragment.kt index 8ecc914318..842757eea1 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateProgressBarDialogFragment.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateProgressBarDialogFragment.kt @@ -76,7 +76,7 @@ class SystemUpdateProgressBarDialogFragment : DialogFragment() { } val progressBarFragment = SystemUpdateResultFragment() - progressBarFragment.show(parentFragmentManager, "OnlineUpdateResultFragment") + progressBarFragment.show(parentFragmentManager, SystemUpdateResultFragment.TAG) dismiss() } @@ -100,4 +100,8 @@ class SystemUpdateProgressBarDialogFragment : DialogFragment() { viewModel.setCanceled() } } + + companion object { + const val TAG = "SystemUpdateProgressBarDialogFragment" + } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateResultFragment.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateResultFragment.kt index 352e6cd47a..a6af39e6b4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateResultFragment.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/sysupdate/ui/SystemUpdateResultFragment.kt @@ -12,6 +12,8 @@ import org.dolphinemu.dolphinemu.R import org.dolphinemu.dolphinemu.utils.WiiUtils class SystemUpdateResultFragment : DialogFragment() { + private val resultKey = "result" + private var mResult = 0 override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { @@ -20,7 +22,7 @@ class SystemUpdateResultFragment : DialogFragment() { mResult = viewModel.resultData.value!!.toInt() viewModel.clear() } else { - mResult = savedInstanceState.getInt("result") + mResult = savedInstanceState.getInt(resultKey) } val message: String = when (mResult) { WiiUtils.UPDATE_RESULT_SUCCESS -> getString(R.string.update_success) @@ -56,6 +58,10 @@ class SystemUpdateResultFragment : DialogFragment() { override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) - outState.putInt("result", mResult) + outState.putInt(resultKey, mResult) + } + + companion object { + const val TAG = "SystemUpdateResultFragment" } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java index 2e5d9c617f..b36a9ced2b 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java @@ -319,7 +319,7 @@ public final class MainPresenter SystemUpdateProgressBarDialogFragment progressBarFragment = new SystemUpdateProgressBarDialogFragment(); progressBarFragment - .show(activity.getSupportFragmentManager(), "SystemUpdateProgressBarDialogFragment"); + .show(activity.getSupportFragmentManager(), SystemUpdateProgressBarDialogFragment.TAG); progressBarFragment.setCancelable(false); }