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

Skip to content
Commit 73e24a2f authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Clear seamless rotation transform for transaction commit timeout

For example:
The rotation transition is ready while the cutout is not yet drawn
for new rotation, then the start transaction of transition will contain
the unrotate-transform to keep the same appearance. But if the
transition player is somehow slow, BLASTSyncEngine will apply the
start transaction after 5s timeout. Then AsyncRotationController will
receive the transaction commit callback to clear the rotation transform
because the display projection transaction was applied.

But the transition player may be still alive, then it still applies
the start transaction again after a few seconds, which causes the
cutout to unrotate while display is already rotated.

So when the timeout case happens, put the recovery transform in the
cleanup transaction which will be applied when the transition is
finished. That avoids keeping a stale transform.

Note that the recovery transform should not be always set in cleanup
transaction, because the seamless windows need to sync until it
reports drawn. Otherwise it will cause flickering.

Bug: 300677147
Test: Set break point at the beginning of
      com.android.wm.shell.transitionon.Transitions#TransitionReady
      Rotate device and wait until log "WM sent Transaction
        to organized, but never received commit callback.
        Application ANR likely to follow." appears.
      Resume the break point and check the cutout shows correctly.

Change-Id: Ibbfcb4a16f08147edf909ace8a8029c4bcf24b14
parent a93ce5ac
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