Merge "Introduce boolean flags to show/hide Encryption status."

This commit is contained in:
TreeHugger Robot
2018-03-07 22:59:34 +00:00
committed by Android (Google) Code Review
4 changed files with 27 additions and 0 deletions

View File

@@ -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;
}