summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-08-15 18:11:30 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-15 18:11:30 -0700
commitbf3bc31da91b711da17fdac66beecc01e53df42a (patch)
treeed9ef9582d08d67455931366aaefafa4ad24d60f
parent4cd3161d7ba2c76fe31f26f0f1d1fc64188705d4 (diff)
parent905c00a405ef2b26c58f19f21d153302c1e21e76 (diff)
downloadpackages_apps_Settings-bf3bc31da91b711da17fdac66beecc01e53df42a.zip
packages_apps_Settings-bf3bc31da91b711da17fdac66beecc01e53df42a.tar.gz
packages_apps_Settings-bf3bc31da91b711da17fdac66beecc01e53df42a.tar.bz2
am 905c00a4: am 55fe056d: Merge "Don\'t apply encryption password requirements for secondary users" into klp-dev
* commit '905c00a405ef2b26c58f19f21d153302c1e21e76': Don't apply encryption password requirements for secondary users
-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);