Merge "Fixing notification background peeking from the bottom when expanding QS" into sc-dev am: 4c4ab603d7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14980855

Change-Id: I1b16dd0c9f8059aaff0c5dbf996d95248746ff71
This commit is contained in:
TreeHugger Robot
2021-06-22 18:13:37 +00:00
committed by Automerger Merge Worker

View File

@@ -551,11 +551,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
*/ */
public void setNotificationsBounds(float left, float top, float right, float bottom) { public void setNotificationsBounds(float left, float top, float right, float bottom) {
if (mClipsQsScrim) { if (mClipsQsScrim) {
// notification scrim's rounded corners are anti-aliased, but clipping of the QS scrim // notification scrim's rounded corners are anti-aliased, but clipping of the QS/behind
// can't be and it's causing jagged corners. That's why notification scrim needs // 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 // to overlap QS scrim by one pixel horizontally (left - 1 and right + 1)
// horizontally (left - 1 and right + 1), see: b/186644628 // see: b/186644628
mNotificationsScrim.setDrawableBounds(left - 1, top - 1, right + 1, bottom); mNotificationsScrim.setDrawableBounds(left - 1, top, right + 1, bottom);
mScrimBehind.setBottomEdgePosition((int) top); mScrimBehind.setBottomEdgePosition((int) top);
} else { } else {
mNotificationsScrim.setDrawableBounds(left, top, right, bottom); mNotificationsScrim.setDrawableBounds(left, top, right, bottom);