Merge "Revert logic to calculate StackEndHeight" into tm-dev

This commit is contained in:
Nicolò Mazzucato
2022-04-01 16:56:52 +00:00
committed by Android (Google) Code Review

View File

@@ -1317,14 +1317,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;
}