From a45a8308ebac32d39554515a5cb5fa89243467d5 Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Thu, 29 Apr 2021 17:37:47 +0000 Subject: [PATCH] Fixing notification scrim bounds in split shade Fixes: 186644249 Test: manual Change-Id: I980aa4fef80776a7d6880fe1a9737e8098647aa3 --- .../NotificationPanelViewController.java | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 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 c79e503379bda..a6f1e1a403cfa 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -2075,20 +2075,18 @@ public class NotificationPanelViewController extends PanelViewController { setQsExpansionEnabled(mAmbientState.getScrollY() == 0); int radius = mScrimCornerRadius; - if (visible || !mShouldUseSplitNotificationShade) { - if (!mShouldUseSplitNotificationShade) { - top = (int) Math.min(qsPanelBottomY, notificationTop); - bottom = getView().getBottom(); - left = getView().getLeft(); - right = getView().getRight(); - radius = (int) MathUtils.lerp(mScreenCornerRadius, mScrimCornerRadius, - Math.min(top / (float) mScrimCornerRadius, 1f)); - } else { - top = Math.min(qsPanelBottomY, mSplitShadeNotificationsTopPadding); - bottom = mNotificationStackScrollLayoutController.getHeight(); - left = mNotificationStackScrollLayoutController.getLeft(); - right = mNotificationStackScrollLayoutController.getRight(); - } + if (!mShouldUseSplitNotificationShade) { + top = (int) Math.min(qsPanelBottomY, notificationTop); + bottom = getView().getBottom(); + left = getView().getLeft(); + right = getView().getRight(); + radius = (int) MathUtils.lerp(mScreenCornerRadius, mScrimCornerRadius, + Math.min(top / (float) mScrimCornerRadius, 1f)); + } else if (qsPanelBottomY > 0) { // so bounds are empty on lockscreen + top = Math.min(qsPanelBottomY, mSplitShadeNotificationsTopPadding); + bottom = mNotificationStackScrollLayoutController.getHeight(); + left = mNotificationStackScrollLayoutController.getLeft(); + right = mNotificationStackScrollLayoutController.getRight(); } // Fancy clipping for quick settings