Check if pref is disabled by admin
Test: robotests Fixes: 137638270 Change-Id: I39953d5b7466281cff7a9a7ffaeb5ba99ab12934
This commit is contained in:
@@ -292,6 +292,18 @@ public class RedactNotificationPreferenceControllerTest {
|
||||
assertThat(mWorkController.isChecked()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isChecked_admin() {
|
||||
Settings.Secure.putIntForUser(mContext.getContentResolver(),
|
||||
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
|
||||
1, 0);
|
||||
|
||||
ShadowRestrictedLockUtilsInternal.setKeyguardDisabledFeatures(
|
||||
KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
|
||||
|
||||
assertThat(mController.isChecked()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setChecked_false() throws Exception {
|
||||
Settings.Secure.putIntForUser(mContext.getContentResolver(),
|
||||
|
Reference in New Issue
Block a user