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:
@@ -41,6 +41,12 @@ public class EncryptionStatusPreferenceController extends BasePreferenceControll
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
if (TextUtils.equals(getPreferenceKey(), PREF_KEY_ENCRYPTION_DETAIL_PAGE) &&
|
||||
!mContext.getResources().getBoolean(
|
||||
R.bool.config_show_encryption_and_credentials_encryption_status)) {
|
||||
return DISABLED_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return mUserManager.isAdminUser() ? AVAILABLE : DISABLED_FOR_USER;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user