Merge "Do not remove the k_k until all users are unlocked" am: 4d20410bf4 am: e013e0b98a am: 48824f7ede

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1550295

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia8dc48481b15486137665734e571408df4e6af60
This commit is contained in:
Tianjie Xu
2021-01-15 14:06:11 +00:00
committed by Automerger Merge Worker

View File

@@ -224,6 +224,10 @@ class RebootEscrowManager {
for (UserInfo user : rebootEscrowUsers) {
allUsersUnlocked &= restoreRebootEscrowForUser(user.id, escrowKey, kk);
}
// Clear the old key in keystore. A new key will be generated by new RoR requests.
mKeyStoreManager.clearKeyStoreEncryptionKey();
onEscrowRestoreComplete(allUsersUnlocked);
}
@@ -273,9 +277,6 @@ class RebootEscrowManager {
} catch (IOException e) {
Slog.w(TAG, "Could not load reboot escrow data for user " + userId, e);
return false;
} finally {
// Clear the old key in keystore. A new key will be generated by new RoR requests.
mKeyStoreManager.clearKeyStoreEncryptionKey();
}
}