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

Commit 2f22ee4d authored by Rubin Xu's avatar Rubin Xu
Browse files

Delete synthetic password keystore keys when user is removed.

Bug: 65718620
Test: Add user, remove user, look at "adb shell su 1000 keystore_cli_v2 list"
      and make sure nothing remains.

Change-Id: I2cf862c35117faed38fdfe5c43ceece4e8dbc3c4
parent 718a2515
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -390,11 +390,9 @@ public class SyntheticPasswordManager {
    }

    public void removeUser(int userId) {
        if (isWeaverAvailable()) {
            for (long handle : mStorage.listSyntheticPasswordHandlesForUser(WEAVER_SLOT_NAME,
                    userId)) {
        for (long handle : mStorage.listSyntheticPasswordHandlesForUser(SP_BLOB_NAME, userId)) {
            destroyWeaverSlot(handle, userId);
            }
            destroySPBlobKey(getHandleName(handle));
        }
    }