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

Commit 6c869151 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Do not abort animations for translucent activities

When Launcher isn't in the opening targets, we should still run
an animation on the closing window, just not on Launcher itself

Test: Close share-sheet with back or home button
Bug: 72686618
Change-Id: I2d55dfa79fe2d2c4bb735cf1a9a4a0b47ff1b7ba
parent 35208bbf
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -809,18 +809,22 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
                postAtFrontOfQueueAsynchronously(handler, () -> {
                    if ((Utilities.getPrefs(mLauncher)
                            .getBoolean("pref_use_screenshot_for_swipe_up", false)
                            && mLauncher.getStateManager().getState().overviewUi)
                            || !launcherIsATargetWithMode(targets, MODE_OPENING)) {
                        // We use a separate transition for Overview mode. And we can skip the
                        // animation in cases where Launcher is not in the set of opening targets.
                        // This can happen when Launcher is already visible. ie. Closing a dialog.
                            && mLauncher.getStateManager().getState().overviewUi)) {
                        // We use a separate transition for Overview mode.
                        setCurrentAnimator(null);
                        finishedCallback.run();
                        return;
                    }

                    // We can skip the Launcher content animation in cases where Launcher is not in
                    // the set of opening targets. This can happen when Launcher is already visible.
                    // ie. closing a dialog. We still need to animate the window though.
                    LauncherTransitionAnimator animator = new LauncherTransitionAnimator(
                            getLauncherResumeAnimation(), getClosingWindowAnimators(targets));
                            launcherIsATargetWithMode(targets, MODE_OPENING)
                                    ? getLauncherResumeAnimation()
                                    : null,
                            getClosingWindowAnimators(targets));

                    setCurrentAnimator(animator);
                    mAnimator = animator.getAnimatorSet();
                    mAnimator.addListener(new AnimatorListenerAdapter() {