Loading packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +2 −3 Original line number Diff line number Diff line Loading @@ -1088,9 +1088,8 @@ constructor( if (!success) finishedCallback?.onAnimationFinished() } } else { // This should never happen, as either the controller or factory should always be // defined. This final call is for safety in case something goes wrong. Log.wtf(TAG, "initAndRun with neither a controller nor factory") // This happens when onDisposed() has already been called due to the animation being // cancelled. Only issue the callback. finishedCallback?.onAnimationFinished() } } Loading packages/SystemUI/tests/src/com/android/systemui/animation/ActivityTransitionAnimatorTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -352,6 +352,7 @@ class ActivityTransitionAnimatorTest : SysuiTestCase() { val controller = createController() val runner = underTest.createEphemeralRunner(controller) runner.onAnimationCancelled() waitForIdleSync() runner.onAnimationStart( TRANSIT_NONE, emptyArray(), Loading @@ -359,12 +360,13 @@ class ActivityTransitionAnimatorTest : SysuiTestCase() { emptyArray(), iCallback, ) waitForIdleSync() verify(controller).onTransitionAnimationCancelled() verify(controller, never()).onTransitionAnimationStart(anyBoolean()) verify(listener).onTransitionAnimationCancelled() verify(listener, never()).onTransitionAnimationStart() verify(iCallback).onAnimationFinished() assertNull(runner.delegate) } } Loading Loading
packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +2 −3 Original line number Diff line number Diff line Loading @@ -1088,9 +1088,8 @@ constructor( if (!success) finishedCallback?.onAnimationFinished() } } else { // This should never happen, as either the controller or factory should always be // defined. This final call is for safety in case something goes wrong. Log.wtf(TAG, "initAndRun with neither a controller nor factory") // This happens when onDisposed() has already been called due to the animation being // cancelled. Only issue the callback. finishedCallback?.onAnimationFinished() } } Loading
packages/SystemUI/tests/src/com/android/systemui/animation/ActivityTransitionAnimatorTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -352,6 +352,7 @@ class ActivityTransitionAnimatorTest : SysuiTestCase() { val controller = createController() val runner = underTest.createEphemeralRunner(controller) runner.onAnimationCancelled() waitForIdleSync() runner.onAnimationStart( TRANSIT_NONE, emptyArray(), Loading @@ -359,12 +360,13 @@ class ActivityTransitionAnimatorTest : SysuiTestCase() { emptyArray(), iCallback, ) waitForIdleSync() verify(controller).onTransitionAnimationCancelled() verify(controller, never()).onTransitionAnimationStart(anyBoolean()) verify(listener).onTransitionAnimationCancelled() verify(listener, never()).onTransitionAnimationStart() verify(iCallback).onAnimationFinished() assertNull(runner.delegate) } } Loading