Merge "Remove unneeded isShadeOpening check when clipping bottom HUN" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-03-15 01:06:32 +00:00
committed by Android (Google) Code Review

View File

@@ -202,12 +202,10 @@ public class StackScrollAlgorithm {
float newHeight = state.height;
float newNotificationEnd = newYTranslation + newHeight;
boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned();
final boolean shadeClosedWithHUN =
ambientState.isShadeOpening() && !ambientState.isShadeExpanded();
if (mClipNotificationScrollToTop
&& (!state.inShelf || (isHeadsUp && !firstHeadsUp))
&& newYTranslation < clipStart
&& shadeClosedWithHUN) {
&& !ambientState.isShadeExpanded()) {
// The previous view is overlapping on top, clip!
float overlapAmount = clipStart - newYTranslation;
state.clipTopAmount = (int) overlapAmount;