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

Commit d4ece9a7 authored by Tony Wickham's avatar Tony Wickham
Browse files

Don't reapply state when setting user controlled animation

Bug: 79525106
Change-Id: Ia41a51559196d4aa657fae47727c7366d9073295
parent cc0453c5
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -387,6 +387,7 @@ public class LauncherStateManager {
    }

    public void setCurrentUserControlledAnimation(AnimatorPlaybackController controller) {
        clearCurrentAnimation();
        setCurrentAnimation(controller.getTarget());
        mConfig.userControlled = true;
        mConfig.playbackController = controller;
@@ -405,15 +406,10 @@ public class LauncherStateManager {
            }
            if (mConfig.playbackController != null
                    && mConfig.playbackController.getTarget() == childAnim) {
                if (mConfig.mCurrentAnimation != null) {
                    mConfig.mCurrentAnimation.removeListener(mConfig);
                    mConfig.mCurrentAnimation = null;
                }
                mConfig.playbackController = null;
                clearCurrentAnimation();
                break;
            } else if (mConfig.mCurrentAnimation == childAnim) {
                mConfig.mCurrentAnimation.removeListener(mConfig);
                mConfig.mCurrentAnimation = null;
                clearCurrentAnimation();
                break;
            }
        }
@@ -425,6 +421,14 @@ public class LauncherStateManager {
        mConfig.setAnimation(anim, null);
    }

    private void clearCurrentAnimation() {
        if (mConfig.mCurrentAnimation != null) {
            mConfig.mCurrentAnimation.removeListener(mConfig);
            mConfig.mCurrentAnimation = null;
        }
        mConfig.playbackController = null;
    }

    private class StartAnimRunnable implements Runnable {

        private final AnimatorSet mAnim;