diff --git a/app/src/main/java/eu/faircode/email/ActivityMain.java b/app/src/main/java/eu/faircode/email/ActivityMain.java index 179902c17a..c539ffb133 100644 --- a/app/src/main/java/eu/faircode/email/ActivityMain.java +++ b/app/src/main/java/eu/faircode/email/ActivityMain.java @@ -461,8 +461,13 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack @Override public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { - if ("eula".equals(key)) - if (prefs.getBoolean(key, false)) - recreate(); + if ("eula".equals(key)) { + boolean eula = prefs.getBoolean(key, false); + if (eula) { + // recreate is done without animation + finish(); + startActivity(getIntent()); + } + } } } diff --git a/app/src/main/java/eu/faircode/email/ActivitySetup.java b/app/src/main/java/eu/faircode/email/ActivitySetup.java index 3628fce84c..18a208e93f 100644 --- a/app/src/main/java/eu/faircode/email/ActivitySetup.java +++ b/app/src/main/java/eu/faircode/email/ActivitySetup.java @@ -164,6 +164,11 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac menus.add(new NavMenuItem(R.drawable.twotone_close_24, R.string.title_setup_close, new Runnable() { @Override public void run() { + if (BuildConfig.DEBUG) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivitySetup.this); + prefs.edit().remove("eula").apply(); + } + onMenuClose(); } }).setColor(colorWarning).setSeparated());