Skip to content
Commit 14bfb89c authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Fix race of releasing leashes with shell recents transition

The code flow:
RecentsAnimationController#finishController
 mOnFinishedListener.accept(this);
  RecentsAnimationCallbacks#onAnimationFinished
   *Post to "main" thread
    RecentsAnimationListener#onRecentsAnimationFinished
     TaskAnimationManager#cleanUpRecentsAnimation
      Invoke SurfaceControl#release
 *Post to "UiThreadHelper" thread
  RemoteTransitionCompat.RecentsControllerWrap#finish
   Invoke SurfaceControl.Transaction#remove
   on the same SurfaceControl.

Then it may be either NullPointerException from
SurfaceControl#checkNotReleased. Or rarely native crash by
changing the surface control from 2 threads at the same time.

Bug: 238192072
Bug: 238047903
Bug: 237631001
Bug: 237497909
Bug: 235616350
Test: Loop launch app and swipe to home.

Change-Id: I7e4ce2c273b8396ed464eb48426fd4435d6c5338
parent d69caeee
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