diff options
-rw-r--r-- | src/com/android/settings/ChooseLockGeneric.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java index d4b9a26..6a34cbd 100644 --- a/src/com/android/settings/ChooseLockGeneric.java +++ b/src/com/android/settings/ChooseLockGeneric.java @@ -24,6 +24,8 @@ import android.content.Context; import android.content.Intent; import android.content.pm.UserInfo; import android.os.Bundle; +import android.os.Process; +import android.os.UserHandle; import android.os.UserManager; import android.preference.Preference; import android.preference.PreferenceActivity; @@ -255,6 +257,8 @@ public class ChooseLockGeneric extends PreferenceActivity { * appropriately.) */ private int upgradeQualityForEncryption(int quality) { + // Don't upgrade quality for secondary users. Encryption requirements don't apply. + if (Process.myUserHandle() != UserHandle.OWNER) return quality; int encryptionStatus = mDPM.getStorageEncryptionStatus(); boolean encrypted = (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE) || (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING); |