Implement the show sensitive content toggle

Implement the show sensitive content only when unlocked toggle on the
notifications on lock screen page. The toggle will become invisible
when the main toggle is unset or when there's no screen locks.

Bug: 367455695
Flag: com.android.server.notification.notification_lock_screen_settings
Test: adb shell settings get secure \
 lock_screen_allow_private_notifications <1|0>
Change-Id: I174478540c4cc2e2df7047049671266041dd41cf
This commit is contained in:
Yining Liu
2024-11-19 22:54:17 +00:00
parent 0d75a26a68
commit c16c9b2df6
3 changed files with 586 additions and 0 deletions

View File

@@ -25,4 +25,14 @@
android:title="@string/switch_on_text"
settings:controller="com.android.settings.notification.LockScreenNotificationsGlobalPreferenceController"/>
<com.android.settingslib.RestrictedSwitchPreference
android:key="lock_screen_notification_show_sensitive_toggle"
android:title="@string/lock_screen_notifications_summary_hide"
settings:controller="com.android.settings.notification.LockScreenNotificationShowSensitiveToggleController" />
<com.android.settingslib.RestrictedSwitchPreference
android:key="work_profile_show_sensitive_notif_toggle"
android:title="@string/lock_screen_notifications_summary_hide_profile"
settings:controller="com.android.settings.notification.LockScreenNotificationShowSensitiveToggleController" />
</PreferenceScreen>