Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4dd07128 authored by wilsonshih's avatar wilsonshih
Browse files

Fix pinned stack destination been overwrite by obsolete animator.

There is a race condition when an app leave from landscape mode and enter
pinned stack in portrait mode. First racer is that TaskStack will post
animateBounds to animation thread, the second is #onConfigurationChanged
will ask TaskStack to update new stack bounds if needed.

When the first animation executed, it will call TaskStack#onAnimationEnd
then #setPinnedStackSize, however, this bounds may already obsoleted if
configuration changed happen after first animation is posted.

To fix this issue, we can cancel the existing animator via verifying the
final destination, and prevent animator set obsoleted bounds back if the
animation is canceled.

Fix: 129723312
Test: Try reproduce this issue over 100+ times.
Test: atest ActivityManagerPinnedStackTests
Test: atest BoundsAnimationControllerTests

Change-Id: I5d42cbe576e7683b22679b1e97be07063c2a05d6
parent be0106ab
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