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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user