summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-08-15 15:35:49 -0700
committerAmith Yamasani <yamasani@google.com>2013-08-15 15:35:49 -0700
commit12411fba8ed5e01f7c4be64c0a77838c7f0d6d2b (patch)
tree4038b2750e2823880e7085956c3aefa29c5ef461 /src
parent53083ab2bbcadf7f1bcbefbaa2e4ee5c85349d84 (diff)
downloadpackages_apps_Settings-12411fba8ed5e01f7c4be64c0a77838c7f0d6d2b.zip
packages_apps_Settings-12411fba8ed5e01f7c4be64c0a77838c7f0d6d2b.tar.gz
packages_apps_Settings-12411fba8ed5e01f7c4be64c0a77838c7f0d6d2b.tar.bz2
Don't apply encryption password requirements for secondary users
Bug: 10314289 Change-Id: I54a54f910c914b41abd3e18963b4bd0c3cddb34a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/ChooseLockGeneric.java4
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);