From 617714f8ca400663fbd88440c8e1ae1252277414 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Fri, 4 Jun 2021 21:13:18 +0200 Subject: [PATCH] Fixed an issue where the notification scrim could become transparent When collapsing QS from fully expanded, there could be a flicker because the calculated top was lower than the bottom. Bug: 190025178 Test: close panel from fully expanded qs, no flicker Change-Id: Iae728ff9563d378dc39555f65eb6a4f9402b5ae2 --- .../statusbar/phone/NotificationPanelViewController.java | 2 ++ 1 file changed, 2 insertions(+) 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 eb46fe3c61774..76f2a8c48144b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -2225,6 +2225,8 @@ public class NotificationPanelViewController extends PanelViewController { left = mNotificationStackScrollLayoutController.getLeft(); right = mNotificationStackScrollLayoutController.getRight(); } + // top should never be lower than bottom, otherwise it will be invisible. + top = Math.min(top, bottom); applyQSClippingBounds(left, top, right, bottom, visible); }