From d37fbdaafe2e97a5564202b1d5f78dfbb6cc43c2 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Tue, 7 Jun 2022 09:30:42 -0400 Subject: [PATCH] Fix pinched short notification at bottom of lockscreen. This change disables the feature on the lockscreen which smoothly transitions the roundness of notifications when they get closer to the shelf. For short notifications (a common occurrence when notifications are redacted) this would cause the TOP corners of the bottommost notification (and the bottom corners of the one above it) to be rounded on the lockscreen. This was because the 'shelf' start was considered to be a shelf height ABOVE the bottom of the stack. This CL just tweaks the shelf position down to where it intuitively is. Fixes: 235234674 Test: manual Change-Id: I2da67022a62f0b3adcd00df1c9b372754ee643fc --- .../android/systemui/statusbar/NotificationShelf.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 0d604014e8f1e..111a00511a782 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -387,7 +387,14 @@ public class NotificationShelf extends ActivatableNotificationView implements if (child instanceof ActivatableNotificationView) { ActivatableNotificationView anv = (ActivatableNotificationView) child; - updateCornerRoundnessOnScroll(anv, viewStart, shelfStart); + // Because we show whole notifications on the lockscreen, the bottom notification is + // always "just about to enter the shelf" by normal scrolling rules. This is fine + // if the shelf is visible, but if the shelf is hidden, it causes incorrect curling. + // notificationClipEnd handles the discrepancy between a visible and hidden shelf, + // so we use that when on the keyguard (and while animating away) to reduce curling. + final float keyguardSafeShelfStart = + mAmbientState.isOnKeyguard() ? notificationClipEnd : shelfStart; + updateCornerRoundnessOnScroll(anv, viewStart, keyguardSafeShelfStart); } }