Set REQUIRE_PASSWORD_TO_DECRYPT to false when insecure screen lock is

enabled

Some users run into a problem when choosing a secure screen lock with
accessiblity enabled that they will not be warned the screen lock may
not be available when they unlock their devices. One cause is
REQUIRE_PASSWORD_TO_DECRYPT is not set back to false when users choose
to use an insecure lock screen. So when they decide to change back to a
secure screen lock, the warning message will not be shown.

Bug: 18799150
Change-Id: I52bdc93e7a5ce3c4f7715057c73b4de280b443f6
This commit is contained in:
Wen ZHANG
2015-04-15 19:32:06 +01:00
parent 1a3c3303eb
commit 95bbbdd097

View File

@@ -472,6 +472,8 @@ public class LockPatternUtils {
updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null);
}
setCredentialRequiredToDecrypt(false);
getDevicePolicyManager().setActivePasswordState(
DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, 0, 0, 0, 0, 0, 0, 0, userHandle);