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

Commit 83bf457a authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing crash when starting transparent activities

StateManager was setting the transition lenght to 0 when a workspace state transtion
was being created as part of launching a transparent activity.

Bug: 77635129
Change-Id: Ie9f40138d9b1387ba880bca0fbf130a4872e8733
parent f7d325a9
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -149,11 +149,13 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
                    @Override
                    public AnimatorSet getAnimator(RemoteAnimationTargetCompat[] targetCompats) {
                        AnimatorSet anim = new AnimatorSet();


                        if (!composeRecentsLaunchAnimator(v, targetCompats, anim)) {
                            // Set the state animation first so that any state listeners are called
                            // before our internal listeners.
                            mLauncher.getStateManager().setCurrentAnimation(anim);

                        if (!composeRecentsLaunchAnimator(v, targetCompats, anim)) {
                            anim.play(getIconAnimator(v));
                            if (launcherIsATargetWithMode(targetCompats, MODE_CLOSING)) {
                                anim.play(getLauncherContentAnimator(false /* show */));
@@ -284,6 +286,11 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag

        target.play(getRecentsWindowAnimator(taskView, skipLauncherChanges, targets));
        target.play(launcherAnim);

        // Set the current animation first, before adding windowAnimEndListener. Setting current
        // animation adds some listeners which need to be called before windowAnimEndListener
        // (the ordering of listeners matter in this case).
        mLauncher.getStateManager().setCurrentAnimation(target);
        target.addListener(windowAnimEndListener);
        return true;
    }