summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shawn Lee <syeonlee@google.com> 2023-06-28 13:57:40 -0700
committer Shawn Lee <syeonlee@google.com> 2023-06-28 13:57:40 -0700
commit6702eaa08b9b5ac9deba7e62fb812a0311250ffb (patch)
treee445b0f5266e3d392bf982904f0d776c0160afea
parentb6629a268677f2a018c763927e72a2f103f8032c (diff)
Fixed notification scrim top corner radius
Because the top of the notification scrim animates down, we want the starting radius to match the device radius to avoid visual glitches. Bug: 289205373 Test: Verified top and bottom corner radii Change-Id: I0636636ca5f74231c52c1c8c200e8dd157b67893
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
index 1361c9f25eff..e95c343565ba 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
@@ -1220,14 +1220,15 @@ public class QuickSettingsController implements Dumpable {
if (mIsFullWidth) {
clipStatusView = qsVisible;
float screenCornerRadius =
- !mSplitShadeEnabled || mRecordingController.isRecording()
- || mCastController.hasConnectedCastDevice()
+ mRecordingController.isRecording() || mCastController.hasConnectedCastDevice()
? 0 : mScreenCornerRadius;
radius = (int) MathUtils.lerp(screenCornerRadius, mScrimCornerRadius,
Math.min(top / (float) mScrimCornerRadius, 1f));
- float bottomRadius = mExpanded ? screenCornerRadius :
- calculateBottomCornerRadius(screenCornerRadius);
+ float bottomRadius = mSplitShadeEnabled ? screenCornerRadius : 0;
+ if (!mExpanded) {
+ bottomRadius = calculateBottomCornerRadius(bottomRadius);
+ }
mScrimController.setNotificationBottomRadius(bottomRadius);
}
if (isQsFragmentCreated()) {