diff options
author | Andrei Kapishnikov <kapishnikov@google.com> | 2015-04-09 11:08:16 -0400 |
---|---|---|
committer | Andrei Kapishnikov <kapishnikov@google.com> | 2015-04-29 02:53:53 +0000 |
commit | 146fc11958ae93d4c97ce83839188ece762f3275 (patch) | |
tree | 3cb2d4cf40e8bc2fd01d2498c9c3d58059ba9559 /src/com/android/settings/ChooseLockGeneric.java | |
parent | 02c89944d13fa473c9fb0da3c5a69777a25fe048 (diff) | |
download | packages_apps_Settings-146fc11958ae93d4c97ce83839188ece762f3275.zip packages_apps_Settings-146fc11958ae93d4c97ce83839188ece762f3275.tar.gz packages_apps_Settings-146fc11958ae93d4c97ce83839188ece762f3275.tar.bz2 |
Added support for DO_NOT_ASK_CREDENTIALS_ON_BOOT DPM flag
When DO_NOT_ASK_CREDENTIALS_ON_BOOT flag is set in
DevicePolicyManager, the Settings UI:
1) Should not encrypt the device with password when the
user encrypts the device for the first time. The default
encryption type should be used instead.
2) Should not give the choice to the user whether to
encrypt the device with password/PIN or not but always
encrypt the device without password.
Related CL: https://googleplex-android-review.git.corp.google.com/#/c/665371/
Change-Id: Ic09f02c033a0b16b7ffc45bf6d675b62d1be4bd8
Diffstat (limited to 'src/com/android/settings/ChooseLockGeneric.java')
-rw-r--r-- | src/com/android/settings/ChooseLockGeneric.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java index 4b2de72..7aa1053 100644 --- a/src/com/android/settings/ChooseLockGeneric.java +++ b/src/com/android/settings/ChooseLockGeneric.java @@ -189,7 +189,9 @@ public class ChooseLockGeneric extends SettingsActivity { // TODO: why does this take disabled, its always called with a quality higher than // what makes sense with disabled == true private void maybeEnableEncryption(int quality, boolean disabled) { - if (Process.myUserHandle().isOwner() && LockPatternUtils.isDeviceEncryptionEnabled()) { + DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(DEVICE_POLICY_SERVICE); + if (Process.myUserHandle().isOwner() && LockPatternUtils.isDeviceEncryptionEnabled() + && !dpm.getDoNotAskCredentialsOnBoot()) { mEncryptionRequestQuality = quality; mEncryptionRequestDisabled = disabled; final Context context = getActivity(); |