Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +3 −3 Original line number Diff line number Diff line Loading @@ -112,9 +112,9 @@ public enum ScrimState { mCurrentInFrontTint = Color.BLACK; mCurrentBehindTint = Color.BLACK; mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG; // DisplayPowerManager will blank the screen for us, we just need // to set our state. mAnimateChange = !mDisplayRequiresBlanking; // DisplayPowerManager may blank the screen for us, // in this case we just need to set our state. mAnimateChange = mDozeParameters.shouldControlScreenOff(); } @Override Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +15 −1 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test public void scrimBlanksBeforeLeavingAoD() { public void scrimBlanksBeforeLeavingAod() { // Simulate unlock with fingerprint mScrimController.transitionTo(ScrimState.AOD); mScrimController.finishAnimationsImmediately(); Loading Loading @@ -455,6 +455,20 @@ public class ScrimControllerTest extends SysuiTestCase { } } @Test public void testAnimatesTransitionToAod() { when(mDozeParamenters.shouldControlScreenOff()).thenReturn(false); ScrimState.AOD.prepare(ScrimState.KEYGUARD); Assert.assertFalse("No animation when ColorFade kicks in", ScrimState.AOD.getAnimateChange()); reset(mDozeParamenters); when(mDozeParamenters.shouldControlScreenOff()).thenReturn(true); ScrimState.AOD.prepare(ScrimState.KEYGUARD); Assert.assertTrue("Animate scrims when ColorFade won't be triggered", ScrimState.AOD.getAnimateChange()); } /** * Conserves old notification density after leaving state and coming back. * Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +3 −3 Original line number Diff line number Diff line Loading @@ -112,9 +112,9 @@ public enum ScrimState { mCurrentInFrontTint = Color.BLACK; mCurrentBehindTint = Color.BLACK; mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG; // DisplayPowerManager will blank the screen for us, we just need // to set our state. mAnimateChange = !mDisplayRequiresBlanking; // DisplayPowerManager may blank the screen for us, // in this case we just need to set our state. mAnimateChange = mDozeParameters.shouldControlScreenOff(); } @Override Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +15 −1 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test public void scrimBlanksBeforeLeavingAoD() { public void scrimBlanksBeforeLeavingAod() { // Simulate unlock with fingerprint mScrimController.transitionTo(ScrimState.AOD); mScrimController.finishAnimationsImmediately(); Loading Loading @@ -455,6 +455,20 @@ public class ScrimControllerTest extends SysuiTestCase { } } @Test public void testAnimatesTransitionToAod() { when(mDozeParamenters.shouldControlScreenOff()).thenReturn(false); ScrimState.AOD.prepare(ScrimState.KEYGUARD); Assert.assertFalse("No animation when ColorFade kicks in", ScrimState.AOD.getAnimateChange()); reset(mDozeParamenters); when(mDozeParamenters.shouldControlScreenOff()).thenReturn(true); ScrimState.AOD.prepare(ScrimState.KEYGUARD); Assert.assertTrue("Animate scrims when ColorFade won't be triggered", ScrimState.AOD.getAnimateChange()); } /** * Conserves old notification density after leaving state and coming back. * Loading