From 6702eaa08b9b5ac9deba7e62fb812a0311250ffb Mon Sep 17 00:00:00 2001 From: Shawn Lee Date: Wed, 28 Jun 2023 13:57:40 -0700 Subject: [PATCH] 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 --- .../android/systemui/shade/QuickSettingsController.java | 9 +++++---- 1 file 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 1361c9f25eff0..e95c343565bad 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()) {