diff options
author | Winson Chung <winsonc@google.com> | 2021-09-15 11:45:49 -0700 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-24 06:22:19 +0000 |
commit | ca677ffd60575d5d792aed52f6a422e9f4355e2e (patch) | |
tree | 1bb157bc3c616c871c70b436435e8941f5309804 | |
parent | 453cf8d44ec41d81a05bb0d6a2ac7791fba206aa (diff) | |
download | base-ca677ffd60575d5d792aed52f6a422e9f4355e2e.tar.gz |
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
Merged-In: I6d3f7f92be567bb561f8cfc62a367c97b00c799d
(cherry picked from commit 4df879db93bff04a258a46bf390d7a3519d99b00)
(cherry picked from commit 6ea2e137afdaaf5173c1da5b7c3337c43176d052)
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 8a7708aaa8c2..3188a522dfad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -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; @@ -990,6 +991,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mLastBiometricMode = mBiometricUnlockController.getMode(); mLastGesturalNav = mGesturalNav; mLastIsDocked = mIsDocked; + mLastAnimatedToSleep = mAnimatedToSleep; mStatusBar.onKeyguardViewManagerStatesUpdated(); } @@ -1033,7 +1035,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); } |