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
11 files changed