Skip to content
Commit 50355ae4 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Don't notify animation finished if no animation

This removes commit ab9fcb21 to avoid potential recursion of
surface placement: onAnimationFinished -> onExitAnimationDone
-> destroySurfaces -> postWindowRemoveCleanupLocked
-> performSurfacePlacementNoTrace.

The original case no longer occurs without the invocation. And now
the window with mRemoveOnExit=true will be removed by WindowState #handleCompleteDeferredRemoval. And if there is only mAnimatingExit,
it will be handled by WS#cleanupAnimatingExitWindow.

The test testStuckExitingWindow is also removed because no matter
with calling onAnimationFinished or not in postApplyAnimation,
the test always passes.

Verified the original issue case: change language and swipe up.
There is no leftover EXITING window. Even hardcode to set the exit
flags unexpectedly, there is still no problem.

Bug: 237481770
Test: WindowStateTests#testDeferredRemovalByAnimating
      WindowContainerTests#testHandleCompleteDeferredRemoval

Change-Id: If10cd3c334476e078fdd4d4db05bf8b37db84ccc
parent df74b6dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment