Merge "DO NOT MERGE: Fix leak when animations are created but never started" into jb-ub-now-indigo-rose

This commit is contained in:
Adam Cohen
2013-10-22 00:25:08 +00:00
committed by Android (Google) Code Review

View File

@@ -30,6 +30,7 @@ public class LauncherAnimUtils {
static HashSet<Animator> sAnimators = new HashSet<Animator>();
static Animator.AnimatorListener sEndAnimListener = new Animator.AnimatorListener() {
public void onAnimationStart(Animator animation) {
sAnimators.add(animation);
}
public void onAnimationRepeat(Animator animation) {
@@ -45,7 +46,6 @@ public class LauncherAnimUtils {
};
public static void cancelOnDestroyActivity(Animator a) {
sAnimators.add(a);
a.addListener(sEndAnimListener);
}