summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2019-07-30 13:17:37 -0700
committer android-build-merger <android-build-merger@google.com> 2019-07-30 13:17:37 -0700
commit9af9fe39f01ae49c348af39923d11b2a756ff5ef (patch)
tree4cec0cea37744befd12b4c00d6df90c5b1c83b9a
parent5f669a500918a04556d842d8d18025ac146aa8cd (diff)
parent24907e82a923611a4b6ff2fc05a7307c4ab79847 (diff)
Merge "Unset the notification expansion state when fully hidden" into qt-r1-dev
am: 24907e82a9 Change-Id: I41471ab51157860af7c3f5cc556c01ed569f2948
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt11
1 files changed, 11 insertions, 0 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 6af1f5bca07f..2f67f90a115e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
@@ -147,6 +147,17 @@ class NotificationWakeUpCoordinator @Inject constructor(
mHeadsUpManagerPhone.addListener(this)
statusBarStateController.addCallback(this)
mDozeParameters = DozeParameters.getInstance(mContext)
+ addListener(object : WakeUpListener {
+ override fun onFullyHiddenChanged(isFullyHidden: Boolean) {
+ if (isFullyHidden && mNotificationsVisibleForExpansion) {
+ // When the notification becomes fully invisible, let's make sure our expansion
+ // flag also changes. This can happen if the bouncer shows when dragging down
+ // and then the screen turning off, where we don't reset this state.
+ setNotificationsVisibleForExpansion(visible = false, animate = false,
+ increaseSpeed = false)
+ }
+ }
+ });
}
fun setStackScroller(stackScroller: NotificationStackScrollLayout) {