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

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

am b8d22d1c: am f68e624f: am a2e1e2ca: am 05ade73e: Merge "Ensure that setting...

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

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


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