Allow null target in ObjectAnimator if the target has never been set am: 4d04b1a446 am: fd2c4f186b

am: 07c6140cda

Change-Id: I230e79daa0e13dffeaa6137ea513272e0b9d45c5
This commit is contained in:
Doris Liu
2016-09-27 07:29:03 +00:00
committed by android-build-merger

View File

@@ -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;
}