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

Commit a6616dec authored by Sunny Goyal's avatar Sunny Goyal Committed by Tony
Browse files

Fixing stateManager not correctly deduping existing animations

Bug: 79251716
Change-Id: I40c3ebf0ec4d49aa1fe1948ad3d83eb87cc1c5f1
parent 729020d1
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -374,7 +374,18 @@ public class LauncherStateManager {
     */
    public void setCurrentAnimation(AnimatorSet anim, Animator... childAnimations) {
        for (Animator childAnim : childAnimations) {
            if (childAnim != null && mConfig.mCurrentAnimation == childAnim) {
            if (childAnim == null) {
                continue;
            }
            if (mConfig.playbackController != null
                    && mConfig.playbackController.getTarget() == childAnim) {
                if (mConfig.mCurrentAnimation != null) {
                    mConfig.mCurrentAnimation.removeListener(mConfig);
                    mConfig.mCurrentAnimation = null;
                }
                mConfig.playbackController = null;
                break;
            } else if (mConfig.mCurrentAnimation == childAnim) {
                mConfig.mCurrentAnimation.removeListener(mConfig);
                mConfig.mCurrentAnimation = null;
                break;