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

Commit ef66f191 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Keyguard shouldn't listen to FP if bouncer showing and keyguard dismissing"

parents e726dbfa f3b8fbdd
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    private int mRingMode;
    private int mPhoneState;
    private boolean mKeyguardIsVisible;

    private boolean mKeyguardGoingAway;
    private boolean mGoingToSleep;
    private boolean mBouncer;
    private boolean mBootCompleted;
@@ -412,6 +412,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        }
    }

    /**
     * Updates KeyguardUpdateMonitor's internal state to know if keyguard is goingAway
     * @param goingAway
     */
    public void setKeyguardGoingAway(boolean goingAway) {
        mKeyguardGoingAway = goingAway;
    }

    private void onFingerprintAuthenticated(int userId) {
        Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated");
        mUserFingerprintAuthenticated.put(userId, true);
@@ -1123,7 +1131,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    }

    private boolean shouldListenForFingerprint() {
        return (mKeyguardIsVisible || !mDeviceInteractive || mBouncer || mGoingToSleep)
        return (mKeyguardIsVisible || !mDeviceInteractive ||
                    (mBouncer && !mKeyguardGoingAway) || mGoingToSleep)
                && (!mSwitchingUser && !isFingerprintDisabled(getCurrentUser()) ||
                mEnableNextFingerprint);
    }
+2 −1
Original line number Diff line number Diff line
@@ -1696,7 +1696,6 @@ public class KeyguardViewMediator extends SystemUI {
            mHideAnimationRun = false;
            adjustStatusBarLocked();
            userActivity();

            mShowKeyguardWakeLock.release();
        }
        mKeyguardDisplayManager.show();
@@ -1723,6 +1722,7 @@ public class KeyguardViewMediator extends SystemUI {
                    flags |= WindowManagerPolicy.KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER;
                }

                mUpdateMonitor.setKeyguardGoingAway(true /* goingAway */);
                // Don't actually hide the Keyguard at the moment, wait for window
                // manager until it tells us it's safe to do so with
                // startKeyguardExitAnimation.
@@ -1804,6 +1804,7 @@ public class KeyguardViewMediator extends SystemUI {
            adjustStatusBarLocked();
            mDismissCallbackRegistry.notifyDismissSucceeded();
            sendUserPresentBroadcast();
            mUpdateMonitor.setKeyguardGoingAway(false /* goingAway */);
        }
        Trace.endSection();
    }