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

Commit 4f988c98 authored by Rubin Xu's avatar Rubin Xu
Browse files

Fix typo in LockSettingsService.getDecryptedPasswordsForAllTiedProfiles

This would have led to existing work profile password not being computed,
causing an untrusted credential reset of the work profile when clearing
device lock.

Bug: 65579699
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testResetPasswordTokenUsableAfterClearingLock
Change-Id: I19e47c511bde693537b40fb652cbdf98a66fb8c1
parent 04b60950
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1142,12 +1142,13 @@ public class LockSettingsService extends ILockSettings.Stub {
                continue;
            }
            try {
                result.put(userId, getDecryptedPasswordForTiedProfile(userId));
                result.put(managedUserId, getDecryptedPasswordForTiedProfile(managedUserId));
            } catch (KeyStoreException | UnrecoverableKeyException | NoSuchAlgorithmException
                    | NoSuchPaddingException | InvalidKeyException
                    | InvalidAlgorithmParameterException | IllegalBlockSizeException
                    | BadPaddingException | CertificateException | IOException e) {
                // ignore
                Slog.e(TAG, "getDecryptedPasswordsForAllTiedProfiles failed for user " +
                    managedUserId, e);
            }
        }
        return result;