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 029a7a5fcdd53..c08479d5bf713 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -743,6 +743,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump mBehindAlpha = behindFraction * mDefaultScrimAlpha; mNotificationsAlpha = mBehindAlpha; + if (mClipsQsScrim) { + mBehindAlpha = 1; + mBehindTint = Color.BLACK; + } } else if (mState == ScrimState.KEYGUARD || mState == ScrimState.SHADE_LOCKED || mState == ScrimState.PULSING) { Pair result = calculateBackStateForState(mState); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java index 786a8586ea39f..1962dc0713501 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java @@ -1103,6 +1103,7 @@ public class ScrimControllerTest extends SysuiTestCase { // GIVEN device has an activity showing ('UNLOCKED' state can occur on the lock screen // with the camera app occluding the keyguard) mScrimController.transitionTo(ScrimState.UNLOCKED); + mScrimController.setClipsQsScrim(true); mScrimController.setRawPanelExpansionFraction(1); // notifications scrim alpha change require calling setQsPosition mScrimController.setQsPosition(0, 300); @@ -1116,6 +1117,12 @@ public class ScrimControllerTest extends SysuiTestCase { mScrimBehind.getViewAlpha(), 1, 0.0); assertEquals("Notifications scrim should be opaque", mNotificationsScrim.getViewAlpha(), 1, 0.0); + + assertScrimTinted(Map.of( + mScrimInFront, true, + mScrimBehind, true, + mNotificationsScrim, false + )); } @Test