diff options
| author | 2019-07-22 18:17:34 -0700 | |
|---|---|---|
| committer | 2019-07-22 18:17:34 -0700 | |
| commit | bf7eea6eeb9583d477bf2644c9847d722a946c0a (patch) | |
| tree | 9e7543af7943e786b9939f4151dd9fa858f23feb | |
| parent | 18d84682d713370097540680a185f0962b00c75c (diff) | |
| parent | 5958b7c77bb1cc7e6da63984ca301bfc40050002 (diff) | |
Merge "Fixed a bug with the animation of the notification background" into qt-dev
am: 5958b7c77b
Change-Id: I212c5057d87658fde1aed02abc54f5c114ba697b
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java | 10 |
1 files changed, 9 insertions, 1 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 8fe34180203f..80e1ac10e319 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 @@ -2516,12 +2516,20 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd } return; } - int minTopPosition = 0; + int minTopPosition; NotificationSection lastSection = getLastVisibleSection(); if (mStatusBarState != StatusBarState.KEYGUARD) { minTopPosition = (int) (mTopPadding + mStackTranslation); } else if (lastSection == null) { minTopPosition = mTopPadding; + } else { + // The first sections could be empty while there could still be elements in later + // sections. The position of these first few sections is determined by the position of + // the first visible section. + NotificationSection firstVisibleSection = getFirstVisibleSection(); + firstVisibleSection.updateBounds(0 /* minTopPosition*/, 0 /* minBottomPosition */, + false /* shiftPulsingWithFirst */); + minTopPosition = firstVisibleSection.getBounds().top; } boolean shiftPulsingWithFirst = mAmbientPulseManager.getAllEntries().count() <= 1; for (NotificationSection section : mSections) { |