diff options
| author | 2016-09-27 00:38:00 +0000 | |
|---|---|---|
| committer | 2016-09-27 00:38:05 +0000 | |
| commit | f574ba6eedab0dcda9e96d6f4bcd33aa42451c38 (patch) | |
| tree | 0b060b7eeb10daa37219c1c525f46d35762b94f5 | |
| parent | db2fcf602967e0f8335aa610a9dc2521a8179bea (diff) | |
| parent | 4d04b1a446cb8c3dc5b42ddd58f82a6127521622 (diff) | |
Merge "Allow null target in ObjectAnimator if the target has never been set" into nyc-mr1-dev
| -rw-r--r-- | core/java/android/animation/ObjectAnimator.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/animation/ObjectAnimator.java b/core/java/android/animation/ObjectAnimator.java index 9a2aa302a4ba..0c21c4ff55e7 100644 --- a/core/java/android/animation/ObjectAnimator.java +++ b/core/java/android/animation/ObjectAnimator.java @@ -977,8 +977,9 @@ public final class ObjectAnimator extends ValueAnimator { @Override void animateValue(float fraction) { final Object target = getTarget(); - if (target == null) { - // We lost the target reference, cancel and clean up. + if (mTarget != null && target == null) { + // We lost the target reference, cancel and clean up. Note: we allow null target if the + /// target has never been set. cancel(); return; } |