OSDN Git Service

Prevents recursive call into end() or cancel()
authorDoris Liu <tianliu@google.com>
Thu, 27 Aug 2015 21:56:30 +0000 (14:56 -0700)
committerDoris Liu <tianliu@google.com>
Thu, 27 Aug 2015 23:13:48 +0000 (16:13 -0700)
commit3dbaae1ef4f221b3626810f4ba19eec068dd6304
treecaf8b0d2304a5545aa1c00d2544277032eeb16a9
parent2916fa11eea3e119b8f24bea4daa861294951813
Prevents recursive call into end() or cancel()

end() and cancel() in ValueAnimator will trigger onAnimationCancel
or onAnimationEnd callback on its listeners. If additional end()
or cancel() request comes from the callback, a loop will be formed.
Therefore, we need to mark when the end is reuqested so we do not
process end() or cancel() request multiple times during one animation
run, and also effectively terminate the loop.

Bug: 23596652
Change-Id: Iefb69eb8969071b43124c09d7cccbe9ff5ba5dcc
core/java/android/animation/ValueAnimator.java