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

Skip to content
Commit 3b64f537 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Delay TransitionAnimator.onAnimationEnd by one frame (1/4)

This CL delays by one frame all the work done at the end of any
transition driven by TransitionAnimator. This includes all dialog and
activity launch animations.

The reason for this CL is explained in the comment added in
TransitionAnimator: any State change performed in an Android animator
callback will be picked up one frame later by Compose during
recomposition, given that both recompositions and Android animators
are scheduled on a Choreographer frame. By posting the work in the main
executor, we leave the current Choreographer frame so that all side
effects at the end of the transitions will be observable at the exact
same time.

This fix/trick was actually already used by Dialog transitions since
http://ag/20139844, so the delay was moved from DialogTransitionAnimator
to TransitionAnimator.

Bug: 330672236
Test: atest ActivityTransitionAnimatorTest
Test: atest DialogTransitionAnimatorTest
Flag: N/A
Change-Id: Idbfced2fa959ec258a8d9f0090e6c1703ea3fc6e
parent 1a89ba6a
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