From 73f0d79cf730c43b16c39164b865b6219cd5a833 Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Tue, 15 Jun 2021 18:05:27 +0100 Subject: [PATCH] Fixing notification background peeking from the bottom when expanding QS The issue was caused by notification scrim shifted 1px upward to overlap quick settings scrim. That was needed because of aliasing issue - but checking now that shouldn't be really required as a long as we have horizontal overlapping still in place. Additionally, this 1px vertical shift might be causing other misalignment issues also when notification scrim is fully visible and views are aligned to the scrim's top. Before (with 1px shift): https://screenshot.googleplex.com/3sWpkb7Zn7W8hQk After (no shift): https://screenshot.googleplex.com/AardmjvDezgGC9Q Fixes: 190767217 Bug: 186644628 Test: see screenshots Change-Id: Ie5ead80aa51f838716f1b355d439f36dd7c3c41b --- .../systemui/statusbar/phone/ScrimController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 7a1e5cf1770b8..1f7ae6a631576 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -551,11 +551,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump */ public void setNotificationsBounds(float left, float top, float right, float bottom) { if (mClipsQsScrim) { - // notification scrim's rounded corners are anti-aliased, but clipping of the QS scrim - // can't be and it's causing jagged corners. That's why notification scrim needs - // to overlap QS scrim by one pixel - both vertically (top - 1) and - // horizontally (left - 1 and right + 1), see: b/186644628 - mNotificationsScrim.setDrawableBounds(left - 1, top - 1, right + 1, bottom); + // notification scrim's rounded corners are anti-aliased, but clipping of the QS/behind + // scrim can't be and it's causing jagged corners. That's why notification scrim needs + // to overlap QS scrim by one pixel horizontally (left - 1 and right + 1) + // see: b/186644628 + mNotificationsScrim.setDrawableBounds(left - 1, top, right + 1, bottom); mScrimBehind.setBottomEdgePosition((int) top); } else { mNotificationsScrim.setDrawableBounds(left, top, right, bottom);