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

Commit 49b9fbd1 authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Polish home-key from split to pip transition" into udc-dev am: ca08d75e am: 93551e94

parents 96fc36f6 93551e94
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.launcher3;

import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING;
import static android.view.RemoteAnimationTarget.MODE_CLOSING;
import static android.view.RemoteAnimationTarget.MODE_OPENING;
@@ -1210,16 +1211,17 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
        return false;
    }

    private boolean hasMultipleTargetsWithMode(RemoteAnimationTarget[] targets, int mode) {
    private boolean shouldPlayFallbackClosingAnimation(RemoteAnimationTarget[] targets) {
        int numTargets = 0;
        for (RemoteAnimationTarget target : targets) {
            if (target.mode == mode) {
            if (target.mode == MODE_CLOSING) {
                numTargets++;
            }
            if (numTargets > 1) {
                if (numTargets > 1 || target.windowConfiguration.getWindowingMode()
                        == WINDOWING_MODE_MULTI_WINDOW) {
                    return true;
                }
            }
        }
        return false;
    }

@@ -1604,7 +1606,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
            boolean playFallBackAnimation = (launcherView == null
                    && launcherIsForceInvisibleOrOpening)
                    || mLauncher.getWorkspace().isOverlayShown()
                    || hasMultipleTargetsWithMode(appTargets, MODE_CLOSING);
                    || shouldPlayFallbackClosingAnimation(appTargets);

            boolean playWorkspaceReveal = true;
            boolean skipAllAppsScale = false;