From e55a4b541aa12399fd40e8b528870682cc466d13 Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Tue, 22 Nov 2022 15:24:27 +0000 Subject: [PATCH] Fixing HUN translation and clipping when swiping up in split shade This reverts changes in NSSL done in ag/19931457 - there I changed top clipping bound to introduce custom changes for split shade. Now I realised that there should be custom logic for bottom clipping bound and overriding height. So quite a bit custom logic, connected with the fact that this clipping is probably not needed at all, made me just disable clipping entirely for split shade. Couldn't find any case where this part would influence anything and fixes nicely two issues with translation and clipping that we have. Fixes: 260083488 Test: manual, videos attached Change-Id: Iad9a110b00ef927622345b22acd4bba5053022c1 --- .../stack/NotificationStackScrollLayout.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 073bd4bf302be..5a754b323c162 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -1401,10 +1401,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mExpandedHeight = height; setIsExpanded(height > 0); int minExpansionHeight = getMinExpansionHeight(); - if (height < minExpansionHeight) { + if (height < minExpansionHeight && !mShouldUseSplitNotificationShade) { mClipRect.left = 0; mClipRect.right = getWidth(); - mClipRect.top = getNotificationsClippingTopBound(); + mClipRect.top = 0; mClipRect.bottom = (int) height; height = minExpansionHeight; setRequestedClipBounds(mClipRect); @@ -1466,17 +1466,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable notifyAppearChangedListeners(); } - private int getNotificationsClippingTopBound() { - if (isHeadsUpTransition()) { - // HUN in split shade can go higher than bottom of NSSL when swiping up so we want - // to give it extra clipping margin. Because clipping has rounded corners, we also - // need to account for that corner clipping. - return -mAmbientState.getStackTopMargin() - mCornerRadius; - } else { - return 0; - } - } - private void notifyAppearChangedListeners() { float appear; float expandAmount;