DO NOT MERGE: Fix leak when animations are created but never started
Bug: 11322014
(cherry picked from commit e206ff0f73)
Change-Id: I5aaf76d7c96e4a7878946d7de337acd858c11f44
This commit is contained in:
committed by
Winson Chung
parent
6811c5a414
commit
7e839ec8f6
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user