diff options
| author | 2019-05-29 17:27:21 -0700 | |
|---|---|---|
| committer | 2019-05-29 17:27:21 -0700 | |
| commit | 9a7520a393ba1595507863b9750aef7aad643df9 (patch) | |
| tree | 7592148ee12f01c7fd6012c7df561600766d514e | |
| parent | ccb6ec86cdae701a488366717bb4f19794237d57 (diff) | |
Fixed that we could be stuck with notifications pulse expanding
We weren't properly reseting the pulse expanding state in the
bypass flow
Fixes: 133868650
Change-Id: Ibddac4a374f6eec990b11e80a824a02cfdd06f99
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt | 17 |
1 files changed, 9 insertions, 8 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 61fc1a3cb38b..3613f9f3ea5f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt @@ -147,11 +147,16 @@ class NotificationWakeUpCoordinator @Inject constructor( // Let's notify the scroller that an animation started notifyAnimationStart(mLinearDozeAmount == 1.0f) } + setDozeAmount(linear, eased) + } + + fun setDozeAmount(linear: Float, eased: Float) { + val changed = linear != mLinearDozeAmount mLinearDozeAmount = linear mDozeAmount = eased mStackScroller.setDozeAmount(mDozeAmount) updateDarkAmount() - if (linear == 0.0f) { + if (changed && linear == 0.0f) { setNotificationsVisible(visible = false, animate = false, increaseSpeed = false); setNotificationsVisibleForExpansion(visible = false, animate = false, increaseSpeed = false) @@ -164,16 +169,12 @@ class NotificationWakeUpCoordinator @Inject constructor( private fun updateDozeAmountIfBypass(): Boolean { if (mBypassController.bypassEnabled) { + var amount = 1.0f; if (mStatusBarStateController.state == StatusBarState.SHADE || mStatusBarStateController.state == StatusBarState.SHADE_LOCKED) { - mDozeAmount = 0.0f - mLinearDozeAmount = 0.0f - } else { - mDozeAmount = 1.0f - mLinearDozeAmount = 1.0f + amount = 0.0f; } - updateDarkAmount() - mStackScroller.setDozeAmount(mDozeAmount) + setDozeAmount(amount, amount) return true } return false |