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

Commit 02626663 authored by Adrian Roos's avatar Adrian Roos
Browse files

AOD: Fix flicker when unlocking with fingerprint

FingerprintUnlockController assumed that not pulsing is the same
as the screen is off. But with AOD this is no longer true. Instead
we now also trigger that flow if the screen is on and dozing.

Change-Id: Iad2fd65c50ad359d50bb357b41c57df123665df2
Fixes: 62885230
Test: Unlock from AOD with fingerprint; ensure that the status bar stays in AOD mode during the transition
parent 1d8d34fa
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -269,10 +269,13 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {

    private int calculateMode() {
        boolean unlockingAllowed = mUpdateMonitor.isUnlockingWithFingerprintAllowed();
        boolean pulsing = mDozeScrimController.isPulsing();
        boolean dozingWithScreenOn = mStatusBar.isDozing() && !mStatusBar.isScreenFullyOff();

        if (!mUpdateMonitor.isDeviceInteractive()) {
            if (!mStatusBarKeyguardViewManager.isShowing()) {
                return MODE_ONLY_WAKE;
            } else if (mDozeScrimController.isPulsing() && unlockingAllowed) {
            } else if ((pulsing || dozingWithScreenOn) && unlockingAllowed) {
                return MODE_WAKE_AND_UNLOCK_PULSING;
            } else if (unlockingAllowed || !mUnlockMethodCache.isMethodSecure()) {
                return MODE_WAKE_AND_UNLOCK;
+8 −0
Original line number Diff line number Diff line
@@ -5161,6 +5161,14 @@ public class StatusBar extends SystemUI implements DemoMode,
        mDozeScrimController.onScreenTurnedOn();
    }

    /**
     * @return true if the screen is currently fully off, i.e. has finished turning off and has
     *         since not started turning on.
     */
    public boolean isScreenFullyOff() {
        return mScreenFullyOff;
    }

    @Override
    public void showScreenPinningRequest(int taskId) {
        if (mKeyguardMonitor.isShowing()) {