From bd6561accf88a41b0379cc167ffc0f4fabd1e894 Mon Sep 17 00:00:00 2001 From: Yining Liu Date: Tue, 19 Nov 2024 22:44:44 +0000 Subject: [PATCH] Implement the Hide seen notifications toggle Implement the Hide seen notifications toggle on the notifications on lock screen page. The toggle will become invisible when the main toggle is unset or when the lock screen notification minimalism feature flag is disabled. Bug: 367455695 Flag: com.android.server.notification.notification_lock_screen_settings Test: adb shell settings get secure \ lock_screen_show_notifications <1|0> Change-Id: I6f94be3295dfbaa978d145d113e03cacc1a232fc --- res/values/strings.xml | 6 + .../lock_screen_notifications_settings.xml | 6 + ...nNotificationHideSeenToggleController.java | 137 ++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 src/com/android/settings/notification/LockScreenNotificationHideSeenToggleController.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 14b497d6434..692941d3ec2 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -8851,6 +8851,12 @@ When your device is locked, how do you want profile notifications to show? + + Hide seen notifications + + + Seen notifications are removed from the lock screen. + Hide silent notifications diff --git a/res/xml/lock_screen_notifications_settings.xml b/res/xml/lock_screen_notifications_settings.xml index b010bf04425..9aaafc6fbb5 100644 --- a/res/xml/lock_screen_notifications_settings.xml +++ b/res/xml/lock_screen_notifications_settings.xml @@ -35,6 +35,12 @@ android:title="@string/lock_screen_notifications_summary_hide_profile" settings:controller="com.android.settings.notification.LockScreenNotificationShowSensitiveToggleController" /> + +