From 5cd49562765746b62028127960e041567a50d526 Mon Sep 17 00:00:00 2001 From: Andrew Sapperstein Date: Mon, 15 Jan 2018 13:46:41 -0800 Subject: [PATCH] Ignore first crash dialog. By default, no longer show the crash dialog the first time an app crashes. Instead, only multiple crashes will show by default. Add developer setting to control behavior, so app developers can ensure dialog always shows when a crash happens. Bug: 63703353, 70640329 Test: robotests, manual crashing with a test app Change-Id: I2e625ed147dafc188b28c52eb1b9cee6b2330d50 --- res/values/strings.xml | 5 + res/xml/development_settings.xml | 4 + .../DevelopmentSettingsDashboardFragment.java | 1 + ...wFirstCrashDialogPreferenceController.java | 94 ++++++++++++ ...stCrashDialogPreferenceControllerTest.java | 145 ++++++++++++++++++ 5 files changed, 249 insertions(+) create mode 100644 src/com/android/settings/development/ShowFirstCrashDialogPreferenceController.java create mode 100644 tests/robotests/src/com/android/settings/development/ShowFirstCrashDialogPreferenceControllerTest.java diff --git a/res/values/strings.xml b/res/values/strings.xml index cfefa55cc45..f42c0fc8bc4 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -9174,6 +9174,11 @@ Track all GNSS constellations and frequencies with no duty cycling + + Always show crash dialog + + Show dialog every time an app crashes + Storage access diff --git a/res/xml/development_settings.xml b/res/xml/development_settings.xml index aad5d2361b1..f6793411d5c 100644 --- a/res/xml/development_settings.xml +++ b/res/xml/development_settings.xml @@ -459,6 +459,10 @@ android:fragment="com.android.settings.applications.appops.BackgroundCheckSummary" android:title="@string/background_check_pref" /> +