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

Commit b2a5f266 authored by Jon Miranda's avatar Jon Miranda
Browse files

Play fallback animation if there are multiple closing targets.

Bug: 200247089
Test: close app w/ gesture nav, 3 button nav
      close split screen apps

Change-Id: I748f038eaf1542014f3acbb8fa31488936835dfe
parent f4f6be60
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1186,6 +1186,19 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
        return false;
    }

    private boolean hasMultipleTargetsWithMode(RemoteAnimationTargetCompat[] targets, int mode) {
        int numTargets = 0;
        for (RemoteAnimationTargetCompat target : targets) {
            if (target.mode == mode) {
                numTargets++;
            }
            if (numTargets > 1) {
                return true;
            }
        }
        return false;
    }

    /**
     * @return Runner that plays when user goes to Launcher
     * ie. pressing home, swiping up from nav bar.
@@ -1580,7 +1593,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
                View launcherView = findLauncherView(appTargets);
                boolean playFallBackAnimation = (launcherView == null
                        && launcherIsForceInvisibleOrOpening)
                        || mLauncher.getWorkspace().isOverlayShown();
                        || mLauncher.getWorkspace().isOverlayShown()
                        || hasMultipleTargetsWithMode(appTargets, MODE_CLOSING);

                boolean playWorkspaceReveal = true;
                boolean skipAllAppsScale = false;