diff options
| author | 2024-07-17 15:48:11 -0700 | |
|---|---|---|
| committer | 2024-07-18 09:46:32 -0700 | |
| commit | 1aa0c2ec1ea59f784e76262e5fdacd1464a7752e (patch) | |
| tree | a55746f9c43d564f9c6e3a9ca5c39edaad914295 | |
| parent | 19a9a180ff2fa6791220f8d4d6adda353262d08a (diff) | |
Clear dream overlay exit animation state when canceling animations.
This changelist ensures that animation state is cleared when animations
are canceled for the dream overlay. There can be other state changes
dependent on the exit animation state being set properly.
Test: atest DreamOverlayAnimationsControllerTest
Fixes: 344620827
Flag: EXEMPT bugfix
Change-Id: Iedcb3049512450cee89b39bf20220966cb965abf
2 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt index 73ef77540398..88ba0411b414 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt @@ -84,7 +84,7 @@ class DreamOverlayAnimationsControllerTest : SysuiTestCase() { verify(mockAnimator, atLeastOnce()).addListener(captor.capture()) captor.allValues.forEach { it.onAnimationEnd(mockAnimator) } - verify(stateController).setExitAnimationsRunning(false) + verify(stateController, times(2)).setExitAnimationsRunning(false) } @Test @@ -154,4 +154,10 @@ class DreamOverlayAnimationsControllerTest : SysuiTestCase() { } ) } + + @Test + fun testCancelAnimations_clearsExitAnimationsRunning() { + controller.cancelAnimations() + verify(stateController).setExitAnimationsRunning(false) + } } diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt index 3294c816d67c..b45ebd865c55 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt +++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt @@ -256,6 +256,7 @@ constructor( it.cancel() null } + mOverlayStateController.setExitAnimationsRunning(false) } private fun blurAnimator( |