Add a toggle for enabling/disabling sensitive lockscreen notifications for Private Space

This adds a toggle in the Private Space Settings page to control the
lockscreen sensitive notifications for the private profile.
Sensitive notifications for private profile will still be disabled if
sensitive notifications are disabled for the main user.

Demo link:https://drive.google.com/file/d/1--LNXziTRTMvfdsJZAh90SiNiPxWNcI8/view?usp=sharing

Bug: 317067050
Test: atest SettingsUnitTests:HidePrivateSpaceSensitiveNotificationsControllerTest

Change-Id: Ie7f18c1a940e5ffd64112a01c48ac9dee58cb1ab
This commit is contained in:
Olivier Nshimiye
2024-02-08 17:41:27 +00:00
parent 022a815033
commit baecaee2a5
6 changed files with 329 additions and 5 deletions

View File

@@ -59,6 +59,17 @@
</PreferenceCategory>
<PreferenceCategory
android:title="@string/private_space_apps_and_notifications_header">
<com.android.settingslib.RestrictedSwitchPreference
android:key="private_space_sensitive_notifications"
android:title="@string/private_space_notifications_title"
android:summary="@string/private_space_sensitive_notifications_description"
settings:controller="com.android.settings.privatespace.HidePrivateSpaceSensitiveNotificationsController" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/private_space_category_system">