Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2be7170 authored by Adrian Roos's avatar Adrian Roos Committed by Android Git Automerger
Browse files

am a2e1e2ca: am 05ade73e: Merge "Ensure that setting an empty password clears it" into lmp-dev

* commit 'a2e1e2ca20dba8d163223364b82861b84d180600':
  Ensure that setting an empty password clears it
parents c043b87d dc1fc7fc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -780,9 +780,9 @@ public class LockPatternUtils {
     */
    public void saveLockPassword(String password, int quality, boolean isFallback, int userHandle) {
        try {
            getLockSettings().setLockPassword(password, userHandle);
            DevicePolicyManager dpm = getDevicePolicyManager();
            if (!TextUtils.isEmpty(password)) {
                getLockSettings().setLockPassword(password, userHandle);
                int computedQuality = computePasswordQuality(password);

                if (userHandle == UserHandle.USER_OWNER) {
@@ -860,6 +860,7 @@ public class LockPatternUtils {
                setString(PASSWORD_HISTORY_KEY, passwordHistory, userHandle);
            } else {
                // Empty password
                getLockSettings().setLockPassword(null, userHandle);
                if (userHandle == UserHandle.USER_OWNER) {
                    // Set the encryption password to default.
                    updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null);