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

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

Merge "Add permission checks to unified challenge cache APIs"

parents 29c159c0 d0d0a1c6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2940,6 +2940,7 @@ public class LockSettingsService extends ILockSettings.Stub {

    @Override
    public boolean tryUnlockWithCachedUnifiedChallenge(int userId) {
        checkPasswordReadPermission();
        try (LockscreenCredential cred = mManagedProfilePasswordCache.retrievePassword(userId)) {
            if (cred == null) {
                return false;
@@ -2951,6 +2952,7 @@ public class LockSettingsService extends ILockSettings.Stub {

    @Override
    public void removeCachedUnifiedChallenge(int userId) {
        checkWritePermission();
        mManagedProfilePasswordCache.removePassword(userId);
    }