Loading packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt +2 −9 Original line number Diff line number Diff line Loading @@ -88,21 +88,14 @@ class DreamOverlayAnimationsControllerTest : SysuiTestCase() { } @Test fun testWakeUpSetsExitAnimationsRunning() { controller.wakeUp() verify(stateController).setExitAnimationsRunning(true) } @Test fun testWakeUpAfterStartWillCancel() { fun testOnWakeUpAfterStartWillCancel() { val mockStartAnimator: AnimatorSet = mock() controller.startEntryAnimations(false, animatorBuilder = { mockStartAnimator }) verify(mockStartAnimator, never()).cancel() controller.wakeUp() controller.onWakeUp() // Verify that we cancelled the start animator in favor of the exit // animator. Loading packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -664,14 +664,14 @@ class DreamOverlayServiceTest : SysuiTestCase() { ) mMainExecutor.runAllReady() mService.onWakeUp() verify(mDreamOverlayContainerViewController).wakeUp() verify(mDreamOverlayContainerViewController).onWakeUp() verify(mDreamOverlayCallbackController).onWakeUp() } @Test fun testWakeUpBeforeStartDoesNothing() { mService.onWakeUp() verify(mDreamOverlayContainerViewController, Mockito.never()).wakeUp() verify(mDreamOverlayContainerViewController, Mockito.never()).onWakeUp() } @Test Loading packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt +1 −3 Original line number Diff line number Diff line Loading @@ -255,10 +255,8 @@ constructor( return mAnimator as AnimatorSet } /** Starts the dream content and dream overlay exit animations. */ fun wakeUp() { fun onWakeUp() { cancelAnimations() mOverlayStateController.setExitAnimationsRunning(true) } /** Cancels the dream content and dream overlay animations, if they're currently running. */ Loading packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayContainerViewController.java +4 −3 Original line number Diff line number Diff line Loading @@ -381,16 +381,17 @@ public class DreamOverlayContainerViewController extends } /** * Handle the dream waking up and run any necessary animations. * Handle the dream waking up. */ public void wakeUp() { public void onWakeUp() { // TODO(b/361872929): clean up this bool as it doesn't do anything anymore // When swiping causes wakeup, do not run any animations as the dream should exit as soon // as possible. if (mWakingUpFromSwipe) { return; } mDreamOverlayAnimationsController.wakeUp(); mDreamOverlayAnimationsController.onWakeUp(); } @Override Loading packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java +1 −1 Original line number Diff line number Diff line Loading @@ -481,7 +481,7 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ public void onWakeUp() { if (mDreamOverlayContainerViewController != null) { mDreamOverlayCallbackController.onWakeUp(); mDreamOverlayContainerViewController.wakeUp(); mDreamOverlayContainerViewController.onWakeUp(); } } Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt +2 −9 Original line number Diff line number Diff line Loading @@ -88,21 +88,14 @@ class DreamOverlayAnimationsControllerTest : SysuiTestCase() { } @Test fun testWakeUpSetsExitAnimationsRunning() { controller.wakeUp() verify(stateController).setExitAnimationsRunning(true) } @Test fun testWakeUpAfterStartWillCancel() { fun testOnWakeUpAfterStartWillCancel() { val mockStartAnimator: AnimatorSet = mock() controller.startEntryAnimations(false, animatorBuilder = { mockStartAnimator }) verify(mockStartAnimator, never()).cancel() controller.wakeUp() controller.onWakeUp() // Verify that we cancelled the start animator in favor of the exit // animator. Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -664,14 +664,14 @@ class DreamOverlayServiceTest : SysuiTestCase() { ) mMainExecutor.runAllReady() mService.onWakeUp() verify(mDreamOverlayContainerViewController).wakeUp() verify(mDreamOverlayContainerViewController).onWakeUp() verify(mDreamOverlayCallbackController).onWakeUp() } @Test fun testWakeUpBeforeStartDoesNothing() { mService.onWakeUp() verify(mDreamOverlayContainerViewController, Mockito.never()).wakeUp() verify(mDreamOverlayContainerViewController, Mockito.never()).onWakeUp() } @Test Loading
packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt +1 −3 Original line number Diff line number Diff line Loading @@ -255,10 +255,8 @@ constructor( return mAnimator as AnimatorSet } /** Starts the dream content and dream overlay exit animations. */ fun wakeUp() { fun onWakeUp() { cancelAnimations() mOverlayStateController.setExitAnimationsRunning(true) } /** Cancels the dream content and dream overlay animations, if they're currently running. */ Loading
packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayContainerViewController.java +4 −3 Original line number Diff line number Diff line Loading @@ -381,16 +381,17 @@ public class DreamOverlayContainerViewController extends } /** * Handle the dream waking up and run any necessary animations. * Handle the dream waking up. */ public void wakeUp() { public void onWakeUp() { // TODO(b/361872929): clean up this bool as it doesn't do anything anymore // When swiping causes wakeup, do not run any animations as the dream should exit as soon // as possible. if (mWakingUpFromSwipe) { return; } mDreamOverlayAnimationsController.wakeUp(); mDreamOverlayAnimationsController.onWakeUp(); } @Override Loading
packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java +1 −1 Original line number Diff line number Diff line Loading @@ -481,7 +481,7 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ public void onWakeUp() { if (mDreamOverlayContainerViewController != null) { mDreamOverlayCallbackController.onWakeUp(); mDreamOverlayContainerViewController.wakeUp(); mDreamOverlayContainerViewController.onWakeUp(); } } Loading