summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Biggers <ebiggers@google.com> 2022-07-27 17:36:40 +0000
committer Eric Biggers <ebiggers@google.com> 2022-07-27 22:04:11 +0000
commit595976d265e22de1cf44dbf12afc59ff11e9c619 (patch)
tree8a51ba3c970bc5d97885f21d37684421d9cfafaa
parent3b3151b18b62ffeeb17abd6e97afa2b371ab0d86 (diff)
Destroy secdiscardable file in destroyProtectorCommon()
The secdiscardable file is common to all protector types, so it should be destroyed in destroyProtectorCommon(). No change in behavior. Change-Id: I6a5ad14c0fe37b80a009ea19db38f93af84958ed
-rw-r--r--services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
index 2d0143abb93f..7ace03d9e230 100644
--- a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
+++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
@@ -1308,7 +1308,6 @@ public class SyntheticPasswordManager {
SyntheticPasswordBlob blob = SyntheticPasswordBlob.fromBytes(loadState(SP_BLOB_NAME,
protectorId, userId));
destroyProtectorCommon(protectorId, userId);
- destroyState(SECDISCARDABLE_NAME, protectorId, userId);
if (blob.mProtectorType == PROTECTOR_TYPE_WEAK_TOKEN_BASED) {
notifyWeakEscrowTokenRemovedListeners(protectorId, userId);
}
@@ -1332,7 +1331,6 @@ public class SyntheticPasswordManager {
*/
public void destroyLskfBasedProtector(long protectorId, int userId) {
destroyProtectorCommon(protectorId, userId);
- destroyState(SECDISCARDABLE_NAME, protectorId, userId);
destroyState(PASSWORD_DATA_NAME, protectorId, userId);
destroyState(PASSWORD_METRICS_NAME, protectorId, userId);
}
@@ -1340,6 +1338,7 @@ public class SyntheticPasswordManager {
private void destroyProtectorCommon(long protectorId, int userId) {
destroyState(SP_BLOB_NAME, protectorId, userId);
destroySPBlobKey(getKeyName(protectorId));
+ destroyState(SECDISCARDABLE_NAME, protectorId, userId);
if (hasState(WEAVER_SLOT_NAME, protectorId, userId)) {
destroyWeaverSlot(protectorId, userId);
}