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

Commit 4df879db authored by Winson Chung's avatar Winson Chung
Browse files

Account for last animated-to-sleep state when calculating nav visibility

- mAnimatedToSleep is true for the duration of the animation to sleep,
  but the last nav visibility is incorrect if it doesn't account for
  the last animated state, which results in the showing the bar to be
  ignored.

Bug: 199536651
Test: atest StatusBarKeyguardViewManagerTest
Test: Enable aod, power off, power on before it fully dozes
Change-Id: I6d3f7f92be567bb561f8cfc62a367c97b00c799d
parent efdb4f8a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
    private boolean mLastGesturalNav;
    private boolean mLastIsDocked;
    private boolean mLastPulsing;
    private boolean mLastAnimatedToSleep;
    private int mLastBiometricMode;
    private boolean mQsExpanded;
    private boolean mAnimatedToSleep;
@@ -992,6 +993,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        mLastBiometricMode = mBiometricUnlockController.getMode();
        mLastGesturalNav = mGesturalNav;
        mLastIsDocked = mIsDocked;
        mLastAnimatedToSleep = mAnimatedToSleep;
        mStatusBar.onKeyguardViewManagerStatesUpdated();
    }

@@ -1035,7 +1037,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        boolean hideWhileDozing = mLastDozing && mLastBiometricMode != MODE_WAKE_AND_UNLOCK_PULSING;
        boolean keyguardWithGestureNav = (keyguardShowing && !mLastDozing
                || mLastPulsing && !mLastIsDocked) && mLastGesturalNav;
        return (!keyguardShowing && !hideWhileDozing || mLastBouncerShowing
        return (!mLastAnimatedToSleep && !keyguardShowing && !hideWhileDozing || mLastBouncerShowing
                || mLastRemoteInputActive || keyguardWithGestureNav
                || mLastGlobalActionsVisible);
    }