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

Commit 441a7d76 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Play fallback animation if there are multiple closing targets." into tm-dev

parents df022bd4 b2a5f266
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;