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
This commit is contained in:
Lyn Han
2021-05-12 16:09:31 -05:00
parent 5183641bef
commit 2e2ac20e52

View File

@@ -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,