Merge "Revert "Revert "Run cleanup before end actions of ViewPropertyAnimator.""" into nyc-dev

This commit is contained in:
George Mount
2016-03-31 20:14:02 +00:00
committed by Android (Google) Code Review

View File

@@ -1110,6 +1110,13 @@ public class ViewPropertyAnimator {
@Override
public void onAnimationEnd(Animator animation) {
mView.setHasTransientState(false);
if (mAnimatorCleanupMap != null) {
Runnable r = mAnimatorCleanupMap.get(animation);
if (r != null) {
r.run();
}
mAnimatorCleanupMap.remove(animation);
}
if (mListener != null) {
mListener.onAnimationEnd(animation);
}
@@ -1120,13 +1127,6 @@ public class ViewPropertyAnimator {
}
mAnimatorOnEndMap.remove(animation);
}
if (mAnimatorCleanupMap != null) {
Runnable r = mAnimatorCleanupMap.get(animation);
if (r != null) {
r.run();
}
mAnimatorCleanupMap.remove(animation);
}
mAnimatorMap.remove(animation);
}