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

Commit 6614ecc8 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Delete unnecessary cache"

parents ca3088a9 61de0cbd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -263,8 +263,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
            return STATE_BIOMETRICS_ERROR;
        } else if (mUnlockMethodCache.canSkipBouncer()) {
            return STATE_LOCK_OPEN;
        } else if (mUnlockMethodCache.isFaceUnlockRunning()
                || updateMonitor.isFaceDetectionRunning()) {
        } else if (updateMonitor.isFaceDetectionRunning()) {
            return STATE_SCANNING_FACE;
        } else {
            return STATE_LOCKED;
+1 −9
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ public class UnlockMethodCache {
    /** Whether the unlock method is currently insecure (insecure method or trusted environment) */
    private boolean mCanSkipBouncer;
    private boolean mTrustManaged;
    private boolean mFaceUnlockRunning;
    private boolean mTrusted;

    private UnlockMethodCache(Context ctx) {
@@ -93,16 +92,13 @@ public class UnlockMethodCache {
        boolean canSkipBouncer = !secure ||  mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
        boolean trustManaged = mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
        boolean trusted = mKeyguardUpdateMonitor.getUserHasTrust(user);
        boolean faceUnlockRunning = mKeyguardUpdateMonitor.isFaceUnlockRunning(user)
                && trustManaged;
        boolean changed = secure != mSecure || canSkipBouncer != mCanSkipBouncer ||
                trustManaged != mTrustManaged  || faceUnlockRunning != mFaceUnlockRunning;
                trustManaged != mTrustManaged;
        if (changed || updateAlways) {
            mSecure = secure;
            mCanSkipBouncer = canSkipBouncer;
            mTrusted = trusted;
            mTrustManaged = trustManaged;
            mFaceUnlockRunning = faceUnlockRunning;
            notifyListeners();
        }
        Trace.endSection();
@@ -171,10 +167,6 @@ public class UnlockMethodCache {
        return mTrustManaged;
    }

    public boolean isFaceUnlockRunning() {
        return mFaceUnlockRunning;
    }

    public static interface OnUnlockMethodChangedListener {
        void onUnlockMethodStateChanged();
    }