From 12411fba8ed5e01f7c4be64c0a77838c7f0d6d2b Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Thu, 15 Aug 2013 15:35:49 -0700 Subject: Don't apply encryption password requirements for secondary users Bug: 10314289 Change-Id: I54a54f910c914b41abd3e18963b4bd0c3cddb34a --- src/com/android/settings/ChooseLockGeneric.java | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.1