summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lyn Han <lynhan@google.com> 2021-06-04 12:47:32 -0500
committer Lyn Han <lynhan@google.com> 2021-06-04 17:51:22 +0000
commit26d13fecf285218230f511c1d1be727ce73e7ed1 (patch)
tree838ecf0c02eea17732e7c00ec0b4c57094cd0b68
parentc0e753076c467dedd31c43d9eb47c617122ae4ac (diff)
Use small corner radius for roundness updates from shelf
Fixes: 187548302 Test: scroll, swipe, dismiss notifications in shade/lockscreen => no sharp corners Change-Id: I166e65e995b4f8fbc5fcc66710942047ce23f03d
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 9dc4ac952b1d..e11e67dfaf1b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -372,6 +372,9 @@ public class NotificationShelf extends ActivatableNotificationView implements
return;
}
+ final float smallCornerRadius =
+ getResources().getDimension(R.dimen.notification_corner_radius_small)
+ / getResources().getDimension(R.dimen.notification_corner_radius);
final float viewEnd = viewStart + anv.getActualHeight();
final float cornerAnimationDistance = mCornerAnimationDistance
* mAmbientState.getExpansionFraction();
@@ -387,7 +390,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
} else if (viewEnd < cornerAnimationTop) {
// Fast scroll skips frames and leaves corners with unfinished rounding.
// Reset top and bottom corners outside of animation bounds.
- anv.setBottomRoundness(anv.isLastInSection() ? 1f : 0f,
+ anv.setBottomRoundness(anv.isLastInSection() ? 1f : smallCornerRadius,
false /* animate */);
}
@@ -401,7 +404,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
} else if (viewStart < cornerAnimationTop) {
// Fast scroll skips frames and leaves corners with unfinished rounding.
// Reset top and bottom corners outside of animation bounds.
- anv.setTopRoundness(anv.isFirstInSection() ? 1f : 0f,
+ anv.setTopRoundness(anv.isFirstInSection() ? 1f : smallCornerRadius,
false /* animate */);
}
}