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

Commit 738af657 authored by Eric Biggers's avatar Eric Biggers Committed by Android (Google) Code Review
Browse files

Merge "Avoid redundant unlock of newly created key"

parents 7bd8a386 361674de
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3047,6 +3047,10 @@ class StorageManagerService extends IStorageManager.Stub

        try {
            mVold.createUserKey(userId, serialNumber, ephemeral);
            // New keys are always unlocked.
            synchronized (mLock) {
                mLocalUnlockedUsers.append(userId);
            }
        } catch (Exception e) {
            Slog.wtf(TAG, e);
        }
@@ -3058,6 +3062,10 @@ class StorageManagerService extends IStorageManager.Stub

        try {
            mVold.destroyUserKey(userId);
            // Destroying a key also locks it.
            synchronized (mLock) {
                mLocalUnlockedUsers.remove(userId);
            }
        } catch (Exception e) {
            Slog.wtf(TAG, e);
        }