Skip to content
Commit 5d49a4be authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Remove edge extension surface onAnimationLeashLost

This ensures that we don't run into any problems with race conditions and concurrent access to the transaction like we would if we were to clean up the the animation finished callback.

The problem was that we were removing the extensionSurfaces using the
mFrameTransaction in the animation finish callback which is which is
executed in the AnimationThread but mFrameTransaction is also used for
applying the animations frame by frame for all animations going through
the SurfaceAnimationRunner which run on the choreographer's looper
thread. This means we can get in a case where two different threads try
and access the mFrameTransaction which isn't supported (b/226317621).

To address this we make sure that the extension clean up, which removes
the edge extension surface, runs through the onAnimationLeashLost
callback so that it is applied on the same transaction and in the same
thread that the window being extended in the animation is reparented out
of the animation leash avoiding any concurrent access to the transaction.

Bug: 226553448

Test: atest CtsWindowManagerDeviceTestCases:AnimationEdgeExtensionTests
Change-Id: I7e65277a2ccf316f3b81d5a5aaebf0c892592aa9
parent 85991042
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