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
Merged-In: I2da67022a62f0b3adcd00df1c9b372754ee643fc
Change-Id: I2da67022a62f0b3adcd00df1c9b372754ee643fc
(cherry picked from commit d37fbdaafe)
This commit is contained in:
Jeff DeCew
2022-06-07 09:30:42 -04:00
parent 0251a89274
commit 6f953c4dd8

View File

@@ -398,7 +398,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);
}
}