diff options
3 files changed, 1 insertions, 106 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 93e9db4e389d..2cd8eafcdb54 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -979,8 +979,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump mBehindTint, interpolatedFraction); } - } else if (mState == ScrimState.AUTH_SCRIMMED_SHADE) { - mNotificationsAlpha = (float) Math.pow(getInterpolatedFraction(), 0.8f); } else if (mState == ScrimState.KEYGUARD || mState == ScrimState.SHADE_LOCKED || mState == ScrimState.PULSING || mState == ScrimState.GLANCEABLE_HUB) { Pair<Integer, Float> result = calculateBackStateForState(mState); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java index baf63d69f2b5..14937295051d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java @@ -99,34 +99,6 @@ public enum ScrimState { } }, - AUTH_SCRIMMED_SHADE { - @Override - public void prepare(ScrimState previousState) { - // notif scrim alpha values are determined by ScrimController#applyState - // based on the shade expansion - - mFrontTint = mBackgroundColor; - mFrontAlpha = .66f; - - mBehindTint = mBackgroundColor; - mBehindAlpha = 1f; - } - }, - - AUTH_SCRIMMED { - @Override - public void prepare(ScrimState previousState) { - mNotifTint = previousState.mNotifTint; - mNotifAlpha = previousState.mNotifAlpha; - - mBehindTint = previousState.mBehindTint; - mBehindAlpha = previousState.mBehindAlpha; - - mFrontTint = mBackgroundColor; - mFrontAlpha = .66f; - } - }, - /** * Showing password challenge on the keyguard. */ 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 38ddb3e426fa..a02d333d1507 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 @@ -30,7 +30,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyFloat; -import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; @@ -1425,8 +1424,7 @@ public class ScrimControllerTest extends SysuiTestCase { HashSet<ScrimState> regularStates = new HashSet<>(Arrays.asList( ScrimState.UNINITIALIZED, ScrimState.KEYGUARD, BOUNCER, ScrimState.DREAMING, ScrimState.BOUNCER_SCRIMMED, ScrimState.BRIGHTNESS_MIRROR, - ScrimState.UNLOCKED, SHADE_LOCKED, ScrimState.AUTH_SCRIMMED, - ScrimState.AUTH_SCRIMMED_SHADE, ScrimState.GLANCEABLE_HUB, + ScrimState.UNLOCKED, SHADE_LOCKED, ScrimState.GLANCEABLE_HUB, ScrimState.GLANCEABLE_HUB_OVER_DREAM)); for (ScrimState state : ScrimState.values()) { @@ -1451,79 +1449,6 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test - public void testAuthScrim_setClipQSScrimTrue_notifScrimOpaque_whenShadeFullyExpanded() { - // GIVEN device has an activity showing ('UNLOCKED' state can occur on the lock screen - // with the camera app occluding the keyguard) - mScrimController.legacyTransitionTo(ScrimState.UNLOCKED); - mScrimController.setClipsQsScrim(true); - mScrimController.setRawPanelExpansionFraction(1); - // notifications scrim alpha change require calling setQsPosition - mScrimController.setQsPosition(0, 300); - finishAnimationsImmediately(); - - // WHEN the user triggers the auth bouncer - mScrimController.legacyTransitionTo(ScrimState.AUTH_SCRIMMED_SHADE); - finishAnimationsImmediately(); - - assertEquals("Behind scrim should be opaque", - 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 - public void testAuthScrim_setClipQSScrimFalse_notifScrimOpaque_whenShadeFullyExpanded() { - // GIVEN device has an activity showing ('UNLOCKED' state can occur on the lock screen - // with the camera app occluding the keyguard) - mScrimController.legacyTransitionTo(ScrimState.UNLOCKED); - mScrimController.setClipsQsScrim(false); - mScrimController.setRawPanelExpansionFraction(1); - // notifications scrim alpha change require calling setQsPosition - mScrimController.setQsPosition(0, 300); - finishAnimationsImmediately(); - - // WHEN the user triggers the auth bouncer - mScrimController.legacyTransitionTo(ScrimState.AUTH_SCRIMMED_SHADE); - finishAnimationsImmediately(); - - assertEquals("Behind scrim should be opaque", - 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 - public void testAuthScrimKeyguard() { - // GIVEN device is on the keyguard - mScrimController.legacyTransitionTo(ScrimState.KEYGUARD); - finishAnimationsImmediately(); - - // WHEN the user triggers the auth bouncer - mScrimController.legacyTransitionTo(ScrimState.AUTH_SCRIMMED); - finishAnimationsImmediately(); - - // THEN the front scrim is updated and the KEYGUARD scrims are the same as the - // KEYGUARD scrim state - assertScrimAlpha(Map.of( - mScrimInFront, SEMI_TRANSPARENT, - mScrimBehind, SEMI_TRANSPARENT, - mNotificationsScrim, TRANSPARENT)); - } - - @Test public void testScrimsVisible_whenShadeVisible() { mScrimController.setClipsQsScrim(true); mScrimController.legacyTransitionTo(ScrimState.UNLOCKED); |