summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gus Prevas <kprevas@google.com> 2018-11-20 14:58:48 -0500
committer Gus Prevas <kprevas@google.com> 2018-11-20 14:58:48 -0500
commitda13cfa59aaa4c6bae76e6c3d0a4161342075d18 (patch)
tree7a45fcb93654c9667c83d5ab28e276a82f39529d
parentd0f47278c4dae7274d6437942f2fca23c148f803 (diff)
Fixes background animation on dismiss.
This change modifies the logic in NotificationStackScrollLayout.updateFirstAndLastBackgroundViews() which determines if the first or last visible notification row has changed. The "old" values were being read after the changes were applied, meaning that the change was never detected, so an animation was never started. Test: manually Change-Id: I29869f5b0f78fd81a17d2c3dbe18c067f94fdb5e Fixes: 119792278
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index ff31b261eb85..970e12d6a3c7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -2770,6 +2770,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
private void updateFirstAndLastBackgroundViews() {
NotificationSection firstSection = getFirstVisibleSection();
NotificationSection lastSection = getLastVisibleSection();
+ ActivatableNotificationView previousFirstChild =
+ firstSection == null ? null : firstSection.getFirstVisibleChild();
+ ActivatableNotificationView previousLastChild =
+ lastSection == null ? null : lastSection.getLastVisibleChild();
ActivatableNotificationView firstChild = getFirstChildWithBackground();
ActivatableNotificationView lastChild = getLastChildWithBackground();
@@ -2777,10 +2781,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
mSections[0], mSections[1], firstChild, lastChild);
if (mAnimationsEnabled && mIsExpanded) {
- mAnimateNextBackgroundTop =
- firstSection == null || firstChild != firstSection.getFirstVisibleChild();
- mAnimateNextBackgroundBottom =
- lastSection == null || lastChild != lastSection.getLastVisibleChild();
+ mAnimateNextBackgroundTop = firstChild != previousFirstChild;
+ mAnimateNextBackgroundBottom = lastChild != previousLastChild;
mAnimateNextSectionBoundsChange = sectionViewsChanged;
} else {
mAnimateNextBackgroundTop = false;