summaryrefslogtreecommitdiff
path: root/api/api_test.go
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-11-23 07:35:46 +0000
committer Riddle Hsu <riddlehsu@google.com> 2024-10-02 08:08:17 +0000
commite685cf0a2a0684a7c6ff4cc76c6ba7d39fd45058 (patch)
treea9dff4e833459502151d4bb4f173da6b33062d27 /api/api_test.go
parent8fa398870d434466c0a3343f0dec7131341195f7 (diff)
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
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions