Remove 'Hide Sensitive Notifications' item from PS settings page

Remove the hide sensitive notifications toggle, but keep private space sensitive notifications always hidden on lockscreen

Bug: 329657118
Test: atest PrivateSpaceMaintainerTest
Test: Manual - verified that PS sensitive notifications are always hidden on lockscreen.

Change-Id: Id4229c11a2c5a3a4d3fedaf710c51f25af64bf86
This commit is contained in:
Olivier Nshimiye
2024-03-28 11:06:03 +00:00
parent 4e32375f3d
commit 7851c33bbd
6 changed files with 6 additions and 290 deletions

View File

@@ -21,6 +21,7 @@ import static android.provider.Settings.Secure.PRIVATE_SPACE_AUTO_LOCK;
import static com.android.settings.privatespace.PrivateSpaceMaintainer.HIDE_PRIVATE_SPACE_ENTRY_POINT_DISABLED_VAL;
import static com.android.settings.privatespace.PrivateSpaceMaintainer.HIDE_PRIVATE_SPACE_ENTRY_POINT_ENABLED_VAL;
import static com.android.settings.privatespace.PrivateSpaceMaintainer.HIDE_PRIVATE_SPACE_SENSITIVE_NOTIFICATIONS_DISABLED_VAL;
import static com.android.settings.privatespace.PrivateSpaceMaintainer.PRIVATE_SPACE_AUTO_LOCK_DEFAULT_VAL;
import static com.google.common.truth.Truth.assertThat;
@@ -162,7 +163,7 @@ public class PrivateSpaceMaintainerTest {
privateSpaceMaintainer.createPrivateSpace();
assertThat(privateSpaceMaintainer.doesPrivateSpaceExist()).isTrue();
assertThat(getPsSensitiveNotificationsValue(privateSpaceMaintainer))
.isEqualTo(HidePrivateSpaceSensitiveNotificationsController.DISABLED);
.isEqualTo(HIDE_PRIVATE_SPACE_SENSITIVE_NOTIFICATIONS_DISABLED_VAL);
}
/**
@@ -374,7 +375,7 @@ public class PrivateSpaceMaintainerTest {
private int getPsSensitiveNotificationsValue(PrivateSpaceMaintainer privateSpaceMaintainer) {
return Settings.Secure.getIntForUser(mContentResolver,
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
HidePrivateSpaceSensitiveNotificationsController.ENABLED,
/* enabled */ 1,
privateSpaceMaintainer.getPrivateProfileHandle().getIdentifier());
}
}