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

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

Add the ability to adjust the timing animation end listener

No behavior change unless someone enables this.

Originally, when calling onAnimationEnd, the listeners are called
before drawing the last animation frame. If the listener is slow,
there may have jank at the end of animation.

If setPostNotifyEndListenerEnabled is enabled, the most common
animators: ValueAnimator and AnimatorSet will run the end listeners
on the next frame of last animation frame. So the implementation
of callback won't delay the animation frame.

Also make FrameTracker exclude the frame of end callback from
jank data if it is the frame after the last animation frame.

Bug: 300035126
Flag: EXEMPT disabled by default
Test: atest FrameworksCoreTests:FrameTrackerTest# \
            testEndAnimationWithLastFrameSyncId
      atest FrameworksCoreTests:ValueAnimatorTests# \
            testPostNotifyEndListener
Change-Id: I0550d951c65fe0e03e81bce883b3b33a796ae532
parent 8fa39887
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment