summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-11-20 23:57:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-11-20 23:57:43 +0000
commitf66699ae165ce30f1cda1cfd704027a75bf457d2 (patch)
tree80b330315e2ce7fbc31bdd04b105651265edf6ad
parent5d7e531cddb56290f8519d5a41c9468c17f50e5c (diff)
parentda13cfa59aaa4c6bae76e6c3d0a4161342075d18 (diff)
Merge "Fixes background animation on dismiss."
-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 5153b119bba8..ecd0d98bdcf4 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
@@ -2768,6 +2768,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();
@@ -2775,10 +2779,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;