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

Commit 530658fc authored by Kevin Chyn's avatar Kevin Chyn Committed by android-build-merger
Browse files

Merge "Keyguard shouldn't listen to FP if bouncer showing and keyguard dismissing" into oc-dev

am: 4be9b2ca

Change-Id: Icc4dcc08a2cc62872ae1b017ebf5c724a7003336
parents 7780b9bc 4be9b2ca
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;
@@ -406,6 +406,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);
@@ -1113,7 +1121,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    }

    private boolean shouldListenForFingerprint() {
        return (mKeyguardIsVisible || !mDeviceInteractive || mBouncer || mGoingToSleep)
        return (mKeyguardIsVisible || !mDeviceInteractive ||
                    (mBouncer && !mKeyguardGoingAway) || mGoingToSleep)
                && !mSwitchingUser && !isFingerprintDisabled(getCurrentUser());
    }

+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();
    }