Merge "Fix NPE in ValueAnimator" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
65dfc2a3e5
@@ -977,7 +977,7 @@ public final class ObjectAnimator extends ValueAnimator {
|
|||||||
@Override
|
@Override
|
||||||
void animateValue(float fraction) {
|
void animateValue(float fraction) {
|
||||||
final Object target = getTarget();
|
final Object target = getTarget();
|
||||||
if (mTarget != null && target == null) {
|
if (target == null) {
|
||||||
// We lost the target reference, cancel and clean up.
|
// We lost the target reference, cancel and clean up.
|
||||||
cancel();
|
cancel();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -982,6 +982,7 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio
|
|||||||
mStarted = true;
|
mStarted = true;
|
||||||
mPaused = false;
|
mPaused = false;
|
||||||
mRunning = false;
|
mRunning = false;
|
||||||
|
mAnimationEndRequested = false;
|
||||||
// Resets mLastFrameTime when start() is called, so that if the animation was running,
|
// Resets mLastFrameTime when start() is called, so that if the animation was running,
|
||||||
// calling start() would put the animation in the
|
// calling start() would put the animation in the
|
||||||
// started-but-not-yet-reached-the-first-frame phase.
|
// started-but-not-yet-reached-the-first-frame phase.
|
||||||
|
|||||||
Reference in New Issue
Block a user