summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rubin Xu <rubinxu@google.com> 2017-09-12 16:25:26 +0100
committer Rubin Xu <rubinxu@google.com> 2017-09-12 16:25:26 +0100
commit4f988c98bf3ea4069d33c538ec3467a86b6d5f6c (patch)
tree4840821ecd1a364eb8ddcb3298ec6e5c49596a10
parent04b609508277a586fec64bb76542dcf9dd9f4f90 (diff)
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
-rw-r--r--services/core/java/com/android/server/locksettings/LockSettingsService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index 018b5fa45a5a..11043bd16648 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -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;