diff --git a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivity.java b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivity.java index 8a078d0eb8..23c3c4c9eb 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivity.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivity.java @@ -96,14 +96,12 @@ protected void onStop() { getWindowManager().getDefaultDisplay().getRotation()); } - @Override - public void onBackPressed() { - mPresenter.onBackPressed(); - } - - @Override public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) { + if (!addToStack && getFragment() != null) { + return; + } + FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); if (addToStack) { @@ -116,7 +114,6 @@ public void showSettingsFragment(String menuTag, boolean addToStack, String game } transaction.addToBackStack(null); - mPresenter.addToStack(); } transaction.replace(R.id.frame_content, SettingsFragment.newInstance(menuTag, gameID), FRAGMENT_TAG); @@ -207,11 +204,6 @@ public void showToastMessage(String message, boolean is_long) { Toast.makeText(this, message, is_long ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show(); } - @Override - public void popBackStack() { - getSupportFragmentManager().popBackStackImmediate(); - } - @Override public void onSettingChanged() { mPresenter.onSettingChanged(); diff --git a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityPresenter.java b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityPresenter.java index cda6b6cb64..0d63873bb5 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityPresenter.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityPresenter.java @@ -22,8 +22,6 @@ public final class SettingsActivityPresenter { private Settings mSettings = new Settings(); - private int mStackCount; - private boolean mShouldSave; private DirectoryStateReceiver directoryStateReceiver; @@ -45,7 +43,6 @@ public void onCreate(Bundle savedInstanceState, String menuTag, String gameId) { } public void onStart() { - this.mStackCount = 0; prepareCitraDirectoriesIfNeeded(); } @@ -117,19 +114,6 @@ public void onStop(boolean finishing) { NativeLibrary.ReloadSettings(); } - public void addToStack() { - mStackCount++; - } - - public void onBackPressed() { - if (mStackCount > 0) { - mView.popBackStack(); - mStackCount--; - } else { - mView.finish(); - } - } - public void onSettingChanged() { mShouldSave = true; } diff --git a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityView.java b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityView.java index eed454242c..0d26d48a71 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityView.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsActivityView.java @@ -55,11 +55,6 @@ public interface SettingsActivityView { */ void showToastMessage(String message, boolean is_long); - /** - * Show the previous fragment. - */ - void popBackStack(); - /** * End the activity. */