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 32d37d18f407..8a64a0d71204 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 @@ -1315,14 +1315,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (mOnStackYChanged != null) { mOnStackYChanged.accept(listenerNeedsAnimation); } - if ((mQsExpansionFraction <= 0 || !mQsFullScreen) && !shouldSkipHeightUpdate()) { - final float endHeight = updateStackEndHeight(); + if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) { + final float endHeight = updateStackEndHeight( + getHeight(), getEmptyBottomMargin(), mTopPadding); updateStackHeight(endHeight, fraction); } } - private float updateStackEndHeight() { - final float stackEndHeight = Math.max(0f, mIntrinsicContentHeight); + private float updateStackEndHeight(float height, float bottomMargin, float topPadding) { + final float stackEndHeight = Math.max(0f, height - bottomMargin - topPadding); mAmbientState.setStackEndHeight(stackEndHeight); return stackEndHeight; }