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

Commit 4b492c37 authored by Joe Bolinger's avatar Joe Bolinger Committed by Automerger Merge Worker
Browse files

Merge "Prevent fingerprint icon from showing when unlocking while fingerprint...

Merge "Prevent fingerprint icon from showing when unlocking while fingerprint is in lockout." into sc-dev am: 598a7988

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15379177

Change-Id: I93c93bd7da3047e16da09f2d7c7a70ee5d0f6179
parents c9a1208f 598a7988
Loading
Loading
Loading
Loading
+13 −2
Original line number Original line Diff line number Diff line
@@ -149,7 +149,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
    private static final boolean DEBUG_SIM_STATES = KeyguardConstants.DEBUG_SIM_STATES;
    private static final boolean DEBUG_SIM_STATES = KeyguardConstants.DEBUG_SIM_STATES;
    private static final boolean DEBUG_FACE = Build.IS_DEBUGGABLE;
    private static final boolean DEBUG_FACE = Build.IS_DEBUGGABLE;
    private static final boolean DEBUG_SPEW = false;
    private static final boolean DEBUG_SPEW = false;
    private static final int LOW_BATTERY_THRESHOLD = 20;
    private static final int FINGERPRINT_LOCKOUT_RESET_DELAY_MS = 600;


    private static final String ACTION_FACE_UNLOCK_STARTED
    private static final String ACTION_FACE_UNLOCK_STARTED
            = "com.android.facelock.FACE_UNLOCK_STARTED";
            = "com.android.facelock.FACE_UNLOCK_STARTED";
@@ -834,8 +834,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
    private void handleFingerprintLockoutReset() {
    private void handleFingerprintLockoutReset() {
        mFingerprintLockedOut = false;
        mFingerprintLockedOut = false;
        mFingerprintLockedOutPermanent = false;
        mFingerprintLockedOutPermanent = false;

        if (isUdfpsEnrolled()) {
            // TODO(b/194825098): update the reset signal(s)
            // A successful unlock will trigger a lockout reset, but there is no guarantee
            // that the events will arrive in a particular order. Add a delay here in case
            // an unlock is in progress. In this is a normal unlock the extra delay won't
            // be noticeable.
            mHandler.postDelayed(this::updateFingerprintListeningState,
                    FINGERPRINT_LOCKOUT_RESET_DELAY_MS);
        } else {
            updateFingerprintListeningState();
            updateFingerprintListeningState();
        }
        }
    }


    private void setFingerprintRunningState(int fingerprintRunningState) {
    private void setFingerprintRunningState(int fingerprintRunningState) {
        boolean wasRunning = mFingerprintRunningState == BIOMETRIC_STATE_RUNNING;
        boolean wasRunning = mFingerprintRunningState == BIOMETRIC_STATE_RUNNING;