From 976850dbdd82345408d614c87e5d11f3e7e85ec6 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Fri, 1 Nov 2024 16:30:45 -0400 Subject: [PATCH] Add skeleton page for bundling Test: BundleTypePreferenceControllerTest Test: BundleGlobalPreferenceControllerTest Test: BundlePreferenceControllerTest Fixes: 376476949 Flag: android.app.notification_classification_ui Change-Id: I6fa7ddfeb5ee6d2033dee4b57b0cc0e76bb347f6 --- res/values/strings.xml | 7 + res/xml/bundle_notifications_settings.xml | 59 ++++++ res/xml/configure_notification_settings.xml | 8 + .../BundleGlobalPreferenceController.java | 61 +++++++ .../BundlePreferenceController.java | 49 +++++ .../BundlePreferenceFragment.java | 60 ++++++ .../BundleTypePreferenceController.java | 83 +++++++++ .../notification/NotificationBackend.java | 56 ++++++ .../BundleGlobalPreferenceControllerTest.java | 101 +++++++++++ .../BundlePreferenceControllerTest.java | 91 ++++++++++ .../BundleTypePreferenceControllerTest.java | 171 ++++++++++++++++++ 11 files changed, 746 insertions(+) create mode 100644 res/xml/bundle_notifications_settings.xml create mode 100644 src/com/android/settings/notification/BundleGlobalPreferenceController.java create mode 100644 src/com/android/settings/notification/BundlePreferenceController.java create mode 100644 src/com/android/settings/notification/BundlePreferenceFragment.java create mode 100644 src/com/android/settings/notification/BundleTypePreferenceController.java create mode 100644 tests/robotests/src/com/android/settings/notification/BundleGlobalPreferenceControllerTest.java create mode 100644 tests/robotests/src/com/android/settings/notification/BundlePreferenceControllerTest.java create mode 100644 tests/robotests/src/com/android/settings/notification/BundleTypePreferenceControllerTest.java diff --git a/res/values/strings.xml b/res/values/strings.xml index a58702a0a2b..6c5e7dee292 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -9029,6 +9029,13 @@ Apply to work profiles Apply to work profile apps + + Bundled notifications + On + Off + Use notification bundling + Notifications with similar themes will be silenced and grouped together for a quieter experience. Bundling will override an app\'s own notification settings. + VR helper services diff --git a/res/xml/bundle_notifications_settings.xml b/res/xml/bundle_notifications_settings.xml new file mode 100644 index 00000000000..34efd7dd49b --- /dev/null +++ b/res/xml/bundle_notifications_settings.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + diff --git a/res/xml/configure_notification_settings.xml b/res/xml/configure_notification_settings.xml index c88b7bace8a..aedf0b413aa 100644 --- a/res/xml/configure_notification_settings.xml +++ b/res/xml/configure_notification_settings.xml @@ -43,6 +43,14 @@ android:targetPackage="com.android.settings" android:targetClass="com.android.settings.notification.history.NotificationHistoryActivity" /> + +