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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17189706

Change-Id: Ia8c47caf8fd491080d97ab9ea0276df8efb2921e
This commit is contained in:
TreeHugger Robot
2022-03-15 01:29:50 +00:00
committed by Automerger Merge Worker

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;