Created
April 1, 2014 01:37
-
-
Save ganadist/9906110 to your computer and use it in GitHub Desktop.
packages/apps/Settings: patch for disable dpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/Cho | |
index 49de366..eea1e1e 100644 | |
--- a/src/com/android/settings/ChooseLockGeneric.java | |
+++ b/src/com/android/settings/ChooseLockGeneric.java | |
@@ -246,6 +246,7 @@ public class ChooseLockGeneric extends PreferenceActivity { | |
} | |
private int upgradeQualityForDPM(int quality) { | |
+ if (true) return quality; | |
// Compare min allowed password quality | |
int minQuality = mDPM.getPasswordQuality(null); | |
if (quality < minQuality) { | |
@@ -264,6 +265,7 @@ public class ChooseLockGeneric extends PreferenceActivity { | |
private int upgradeQualityForEncryption(int quality) { | |
// Don't upgrade quality for secondary users. Encryption requirements don't ap | |
if (!Process.myUserHandle().equals(UserHandle.OWNER)) return quality; | |
+ if (true) return quality; | |
int encryptionStatus = mDPM.getStorageEncryptionStatus(); | |
boolean encrypted = (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS | |
|| (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATI | |
@@ -276,6 +278,7 @@ public class ChooseLockGeneric extends PreferenceActivity { | |
} | |
private int upgradeQualityForKeyStore(int quality) { | |
+ if (true) return quality; | |
if (!mKeyStore.isEmpty()) { | |
if (quality < CredentialStorage.MIN_PASSWORD_QUALITY) { | |
quality = CredentialStorage.MIN_PASSWORD_QUALITY; | |
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/Ch | |
index f43738f..9602447 100644 | |
--- a/src/com/android/settings/ChooseLockPassword.java | |
+++ b/src/com/android/settings/ChooseLockPassword.java | |
@@ -336,6 +336,7 @@ public class ChooseLockPassword extends PreferenceActivity { | |
nonletter++; | |
} | |
} | |
+ if (false) { | |
if (DevicePolicyManager.PASSWORD_QUALITY_NUMERIC == mRequestedQuality | |
&& (letters > 0 || symbols > 0)) { | |
// This shouldn't be possible unless user finds some way to bring up | |
@@ -379,6 +380,7 @@ public class ChooseLockPassword extends PreferenceActivity { | |
return getString(R.string.lockpassword_password_requires_digit); | |
} | |
} | |
+ } | |
if(mLockPatternUtils.checkPasswordHistory(password)) { | |
return getString(mIsAlphaMode ? R.string.lockpassword_password_recently_us | |
: R.string.lockpassword_pin_recently_used); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment