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 ff31b261eb858..970e12d6a3c79 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;