diff options
| author | 2021-05-11 14:24:38 -0400 | |
|---|---|---|
| committer | 2021-05-20 09:42:48 -0400 | |
| commit | a00471a7180e9238c6ea91c8ea4e8c446fcf4d0d (patch) | |
| tree | 1ef0c4732de0fd367f6f08391403f48483d813b6 | |
| parent | 25ad0530803567da5ed8c7a54e2b324d290ceaec (diff) | |
Fix issue where notifications remained hidden on lock screen after two quick power presses.
Tested at ToT and can't reproduce either the missing notifications, or the b/184396499 issue where the shade's notifications would be missing after allowing the phone to timeout and then using fingerprint bypass.
Fixes: 184028145
Bug: 184396499
Test: press power to lock and press it again quickly to cancel
Test: allow screen to timeout, then bypass using fingerprint
Change-Id: I3aa2ac74a1cf90a400cb7240453ee2af0015556e
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt | 5 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt index c0fbf68768cd..7afb0151aeda 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt @@ -393,6 +393,11 @@ class NotificationWakeUpCoordinator @Inject constructor( override fun onDozingChanged(isDozing: Boolean) { if (isDozing) { setNotificationsVisible(visible = false, animate = false, increaseSpeed = false) + } else { + // We only unset the flag once we fully went asleep. If the user interrupts the + // animation in the middle, we have to abort the animation as well to make sure + // the notifications are visible again. + animatingScreenOff = false } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index ec012bfde9b8..577e44bb5564 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3609,10 +3609,16 @@ public class StatusBar extends SystemUI implements DemoMode, boolean visibleNotOccluded = mStatusBarKeyguardViewManager.isShowing() && !mStatusBarKeyguardViewManager.isOccluded(); + // If we're dozing and we'll be animating the screen off, the keyguard isn't currently + // visible but will be shortly for the animation, so we should proceed as if it's visible. + boolean visibleNotOccludedOrWillBe = + visibleNotOccluded || (mDozing && mDozeParameters.shouldControlUnlockedScreenOff()); + boolean wakeAndUnlock = mBiometricUnlockController.getMode() == BiometricUnlockController.MODE_WAKE_AND_UNLOCK; boolean animate = (!mDozing && mDozeServiceHost.shouldAnimateWakeup() && !wakeAndUnlock) - || (mDozing && mDozeServiceHost.shouldAnimateScreenOff() && visibleNotOccluded); + || (mDozing && mDozeServiceHost.shouldAnimateScreenOff() + && visibleNotOccludedOrWillBe); mNotificationPanelViewController.setDozing(mDozing, animate, mWakeUpTouchLocation); updateQsExpansionEnabled(); |