OSDN Git Service

Merge "Fixed a bug with the animation of the notification background" into qt-dev
authorSelim Cinek <cinek@google.com>
Tue, 23 Jul 2019 01:17:15 +0000 (18:17 -0700)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 23 Jul 2019 01:17:15 +0000 (18:17 -0700)
am: 5958b7c77b

Change-Id: I523abfa025e8c25c6fa7e198e172ae2b4db08158

1  2 
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java

@@@ -2549,17 -2516,22 +2549,25 @@@ public class NotificationStackScrollLay
              }
              return;
          }
-         int minTopPosition = 0;
+         int minTopPosition;
          NotificationSection lastSection = getLastVisibleSection();
 -        if (mStatusBarState != StatusBarState.KEYGUARD) {
 +        boolean onKeyguard = mStatusBarState == StatusBarState.KEYGUARD;
 +        if (!onKeyguard) {
              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;
 +        boolean shiftPulsingWithFirst = mHeadsUpManager.getAllEntries().count() <= 1
 +                && (mAmbientState.isDozing()
 +                        || (mKeyguardBypassController.getBypassEnabled() && onKeyguard));
          for (NotificationSection section : mSections) {
              int minBottomPosition = minTopPosition;
              if (section == lastSection) {