From 2e2ac20e52505c3dca858d4036e1eff581457b9a Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Wed, 12 May 2021 16:09:31 -0500 Subject: [PATCH] Exclude scrim padding when calculating stack height on lockscreen Since we don't use notification background scrim on lockscreen Bug: 187195324 Test: lockscreen stack height looks correct Change-Id: Id66da679c39fdec488318f6f920fa90241d17115 --- .../notification/stack/NotificationStackScrollLayout.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 3b64d48f4df90..786fe2c284450 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 @@ -1149,8 +1149,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mOnStackYChanged.run(); } if (mQsExpansionFraction <= 0) { + final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mSidePaddings; final float stackEndHeight = Math.max(0f, - getHeight() - getEmptyBottomMargin() - stackY - mSidePaddings); + getHeight() - getEmptyBottomMargin() - stackY - scrimTopPadding); mAmbientState.setStackEndHeight(stackEndHeight); mAmbientState.setStackHeight( MathUtils.lerp(stackEndHeight * StackScrollAlgorithm.START_FRACTION,