From 9e595303be096b7f2b8da2c43d3cd487f52f2a60 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Mon, 14 Mar 2022 17:49:18 -0500 Subject: [PATCH] Remove unneeded isShadeOpening check when clipping bottom HUN Bug: 200544499 Test: send tall HUN, then short HUN => no clipping Change-Id: I4447e0cbb2d13da7b0bf1151541374ea0835b6c2 --- .../statusbar/notification/stack/StackScrollAlgorithm.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index 952cd9ae69bc7..e1f8c35c37555 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -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;