Merge "Fix latent bug with reinitializing an ObjectAnimator." into honeycomb

This commit is contained in:
Patrick Dubroy
2011-01-16 14:56:36 -08:00
committed by Android (Google) Code Review

View File

@@ -340,8 +340,9 @@ public final class ObjectAnimator extends ValueAnimator {
@Override
public void setTarget(Object target) {
if (mTarget != target) {
final Object oldTarget = mTarget;
mTarget = target;
if (mTarget != null && target != null && mTarget.getClass() == target.getClass()) {
if (oldTarget != null && target != null && oldTarget.getClass() == target.getClass()) {
return;
}
// New target type should cause re-initialization prior to starting