Introduce boolean flags to show/hide Encryption status.
This adds one new flag:
config_show_encryption_and_credentials_encryption_status
Which when set to false, will hide Encryption status from Encryption &
credentials. This is when the storage is not being handed by Android,
and so this preference would not be necessarily correct.
Bug: 74127210
Test: Updated robotests
Change-Id: I13665fa369086ef29a4de5f99a78bfbaf96f2f6b
(cherry picked from commit 2d5df469d3
)
This commit is contained in:
@@ -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