From f64ce9e5e458cf59d818ce7234b510cec25996a5 Mon Sep 17 00:00:00 2001 From: Chloris Kuo Date: Thu, 22 Oct 2020 07:27:43 -0700 Subject: [PATCH] Add flag to reset notification channel importance Add a button in development option to unlock user previously changed notification importance and allow NAS to change the importance Test: make RunSettingsRoboTests Change-Id: I55b5349d6a17a383888c59b9126832c2fb8c58a0 --- res/layout/reset_importance_button.xml | 33 ++++++++ res/values/strings.xml | 6 ++ res/xml/development_settings.xml | 7 ++ .../ImportanceResetPreferenceController.java | 68 ++++++++++++++++ .../notification/NotificationBackend.java | 8 ++ ...portanceResetPreferenceControllerTest.java | 78 +++++++++++++++++++ 6 files changed, 200 insertions(+) create mode 100644 res/layout/reset_importance_button.xml create mode 100644 src/com/android/settings/notification/ImportanceResetPreferenceController.java create mode 100644 tests/robotests/src/com/android/settings/notification/ImportanceResetPreferenceControllerTest.java diff --git a/res/layout/reset_importance_button.xml b/res/layout/reset_importance_button.xml new file mode 100644 index 00000000000..6d023b93913 --- /dev/null +++ b/res/layout/reset_importance_button.xml @@ -0,0 +1,33 @@ + + + + + +