From 47d2f50ecf79b1944ba305fd1b5801d6a7eb46bf Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 26 May 2021 19:20:25 +0200 Subject: [PATCH] Fixed an issue where the statusview could become clipped In split shade, we were not resetting the clip bounds. Bug: 184946919 Test: start drag down on portrait, rotate Change-Id: I9d77c818aa6a97fb5d1632a1d959d9ac5579815b --- .../statusbar/phone/NotificationPanelViewController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index c3fed55e42d97..571c1a78f5e8c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -2236,11 +2236,11 @@ public class NotificationPanelViewController extends PanelViewController { // Fancy clipping for quick settings int radius = mScrimCornerRadius; int statusBarClipTop = 0; + boolean clipStatusView = false; if (!mShouldUseSplitNotificationShade) { // The padding on this area is large enough that we can use a cheaper clipping strategy mKeyguardStatusAreaClipBounds.set(left, top, right, bottom); - mKeyguardStatusViewController.setClipBounds(visible - ? mKeyguardStatusAreaClipBounds : null); + clipStatusView = visible; radius = (int) MathUtils.lerp(mScreenCornerRadius, mScrimCornerRadius, Math.min(top / (float) mScrimCornerRadius, 1f)); statusBarClipTop = top - mKeyguardStatusBar.getTop(); @@ -2248,6 +2248,8 @@ public class NotificationPanelViewController extends PanelViewController { if (mQs != null) { mQs.setFancyClipping(top, bottom, radius, visible); } + mKeyguardStatusViewController.setClipBounds( + clipStatusView ? mKeyguardStatusAreaClipBounds : null); mScrimController.setNotificationsBounds(left, top, right, bottom); mScrimController.setScrimCornerRadius(radius); mKeyguardStatusBar.setTopClipping(statusBarClipTop);