Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e206ff0f authored by Michael Jurka's avatar Michael Jurka
Browse files

Fix leak when animations are created but never started

Bug: 11322014
parent 4f98332b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }