Merge "Introduce boolean flags to show/hide Encryption status."
This commit is contained in:
committed by
Android (Google) Code Review
commit
322124d3c6
@@ -34,6 +34,7 @@
|
||||
<bool name="config_show_screen_locking_sounds">false</bool>
|
||||
<bool name="config_show_touch_sounds">false</bool>
|
||||
<bool name="config_show_device_administrators">false</bool>
|
||||
<bool name="config_show_encryption_and_credentials_encryption_status">false</bool>
|
||||
<bool name="config_show_premium_sms">false</bool>
|
||||
<bool name="config_show_data_saver">false</bool>
|
||||
<bool name="config_show_enabled_vr_listeners">false</bool>
|
||||
|
@@ -67,6 +67,23 @@ public class EncryptionStatusPreferenceControllerTest {
|
||||
assertThat(mController.isAvailable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(qualifiers = "mcc999")
|
||||
public void isAvailable_notVisible_false() {
|
||||
assertThat(mController.isAvailable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(qualifiers = "mcc999")
|
||||
public void isAvailable_notVisible_butNotDetailPage_true() {
|
||||
mController = new EncryptionStatusPreferenceController(mContext,
|
||||
PREF_KEY_ENCRYPTION_SECURITY_PAGE);
|
||||
|
||||
UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
|
||||
Shadows.shadowOf(userManager).setIsAdminUser(true);
|
||||
assertThat(mController.isAvailable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateSummary_encrypted_shouldSayEncrypted() {
|
||||
ShadowLockPatternUtils.setDeviceEncryptionEnabled(true);
|
||||
|
Reference in New Issue
Block a user