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

Commit 23e3c17f authored by Sam Dubey's avatar Sam Dubey Committed by Android (Google) Code Review
Browse files

Revert "Do not enter pip during transient launch."

This reverts commit 842e0653.

Reason for revert: b/291722322

Change-Id: Ib036c73cd1cf175d96f07335b260ce3678762091
parent 842e0653
Loading
Loading
Loading
Loading
+9 −10
Original line number Original line Diff line number Diff line
@@ -5251,18 +5251,17 @@ class Task extends TaskFragment {
            // Ensure that we do not trigger entering PiP an activity on the root pinned task.
            // Ensure that we do not trigger entering PiP an activity on the root pinned task.
            return;
            return;
        }
        }
        final boolean isTransient = opts != null && opts.getTransientLaunch();
        final Task targetRootTask = toFrontTask != null
        final Task targetRootTask = toFrontTask != null
                ? toFrontTask.getRootTask() : toFrontActivity.getRootTask();
                ? toFrontTask.getRootTask() : toFrontActivity.getRootTask();
        final boolean isTransient = opts != null && opts.getTransientLaunch()
        if (targetRootTask != null && (targetRootTask.isActivityTypeAssistant() || isTransient)) {
                || (targetRootTask != null
            // Ensure the task/activity being brought forward is not the assistant and is not
                && targetRootTask.mTransitionController.isTransientHide(targetRootTask));
            // transient. In the case of transient-launch, we want to wait until the end of the

            // transition and only allow switch if the transient launch was committed.
        // Ensure the task/activity being brought forward is not the assistant and is not transient
            return;
        // nor transient hide target. In the case of transient-launch, we want to wait until the end
        }
        // of the transition and only allow to enter pip on task switch after the transient launch
        pipCandidate.supportsEnterPipOnTaskSwitch = true;
        // was committed.

        pipCandidate.supportsEnterPipOnTaskSwitch = targetRootTask == null
                || !(targetRootTask.isActivityTypeAssistant() || isTransient);
    }
    }


    /**
    /**
+0 −4
Original line number Original line Diff line number Diff line
@@ -1041,10 +1041,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            ar.getTaskFragment().startPausing(false /* uiSleeping */,
            ar.getTaskFragment().startPausing(false /* uiSleeping */,
                    null /* resuming */, "finishTransition");
                    null /* resuming */, "finishTransition");
        } finally {
        } finally {
            // Didn't schedule for pip, clear the supportsEnterPipOnTaskSwitch flag.
            if (!ar.mPauseSchedulePendingForPip) {
                ar.supportsEnterPipOnTaskSwitch = false;
            }
            mController.mAtm.mTaskSupervisor.mUserLeaving = false;
            mController.mAtm.mTaskSupervisor.mUserLeaving = false;
        }
        }
        // Return false anyway because there's no guarantee that the app will enter pip.
        // Return false anyway because there's no guarantee that the app will enter pip.