diff options
author | 2023-12-12 07:39:20 +0000 | |
---|---|---|
committer | 2023-12-12 23:27:49 +0000 | |
commit | a172b3f15bf9a459271762109b90b19d686bba96 (patch) | |
tree | 9244794ffebfea912e1cee5acd53a72554aeca07 /api/api.go | |
parent | 72e4b15affdc520f4d9484f964781d3510b74c96 (diff) |
Only set `mEnded` to true if `pulseAnimationFrame` returns true
Previously this can set the value to false if `pulseAnimationFrame` returns false but the animation has already called its end listener and ended the animation, this would result in the value of `mEnded` being overwritten from true back to false and the `AnimatorSet` running indefinitely.
This can happen with an `ObjectAnimator` that is referencing a target that has been garbage collected, in this case `ObjectAnimator` will immediately cancel itself when animating values, which happens as part of `pulseAnimationFrame`, however the return value from `pulseAnimationFrame` is based only on the duration of the animation so even though the `ObjectAnimator` has ended by cancelling itself `pulseAnimationFrame` will return false as the current time has not exceeded the play time of the animator.
Change-Id: I08c7790346b092ad3cd8938bbe02973148ac108e
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions