Auto disable action mode on crashes

This commit is contained in:
M66B
2023-08-13 16:32:36 +02:00
parent 9c701e86f2
commit 9da7815dd3
3 changed files with 133 additions and 6 deletions

View File

@@ -366,12 +366,14 @@ public class ApplicationEx extends Application
static void upgrade(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
int version = prefs.getInt("version", BuildConfig.VERSION_CODE);
if (version != BuildConfig.VERSION_CODE)
EntityLog.log(context, "Upgrading from " + version + " to " + BuildConfig.VERSION_CODE);
SharedPreferences.Editor editor = prefs.edit();
int version = prefs.getInt("version", BuildConfig.VERSION_CODE);
if (version != BuildConfig.VERSION_CODE) {
EntityLog.log(context, "Upgrading from " + version + " to " + BuildConfig.VERSION_CODE);
editor.remove("action_mode_crashes");
}
if (version < BuildConfig.VERSION_CODE)
editor.remove("crash_report_count");
@@ -730,7 +732,7 @@ public class ApplicationEx extends Application
if (override_width)
editor.putBoolean("overview_mode", true);
editor.remove("override_width");
} else if (version < 2089){
} else if (version < 2089) {
if (!prefs.contains("auto_hide_answer"))
editor.putBoolean("auto_hide_answer", !Helper.isAccessibilityEnabled(context));
}