Loading services/core/java/com/android/server/wm/Task.java +10 −9 Original line number Diff line number Diff line Loading @@ -5251,17 +5251,18 @@ class Task extends TaskFragment { // Ensure that we do not trigger entering PiP an activity on the root pinned task. return; } final boolean isTransient = opts != null && opts.getTransientLaunch(); final Task targetRootTask = toFrontTask != null ? toFrontTask.getRootTask() : toFrontActivity.getRootTask(); if (targetRootTask != null && (targetRootTask.isActivityTypeAssistant() || isTransient)) { // Ensure the task/activity being brought forward is not the assistant and is not // 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. return; } pipCandidate.supportsEnterPipOnTaskSwitch = true; final boolean isTransient = opts != null && opts.getTransientLaunch() || (targetRootTask != null && targetRootTask.mTransitionController.isTransientHide(targetRootTask)); // Ensure the task/activity being brought forward is not the assistant and is not transient // 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 // was committed. pipCandidate.supportsEnterPipOnTaskSwitch = targetRootTask == null || !(targetRootTask.isActivityTypeAssistant() || isTransient); } /** Loading services/core/java/com/android/server/wm/Transition.java +4 −0 Original line number Diff line number Diff line Loading @@ -1041,6 +1041,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { ar.getTaskFragment().startPausing(false /* uiSleeping */, null /* resuming */, "finishTransition"); } finally { // Didn't schedule for pip, clear the supportsEnterPipOnTaskSwitch flag. if (!ar.mPauseSchedulePendingForPip) { ar.supportsEnterPipOnTaskSwitch = false; } mController.mAtm.mTaskSupervisor.mUserLeaving = false; } // Return false anyway because there's no guarantee that the app will enter pip. Loading Loading
services/core/java/com/android/server/wm/Task.java +10 −9 Original line number Diff line number Diff line Loading @@ -5251,17 +5251,18 @@ class Task extends TaskFragment { // Ensure that we do not trigger entering PiP an activity on the root pinned task. return; } final boolean isTransient = opts != null && opts.getTransientLaunch(); final Task targetRootTask = toFrontTask != null ? toFrontTask.getRootTask() : toFrontActivity.getRootTask(); if (targetRootTask != null && (targetRootTask.isActivityTypeAssistant() || isTransient)) { // Ensure the task/activity being brought forward is not the assistant and is not // 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. return; } pipCandidate.supportsEnterPipOnTaskSwitch = true; final boolean isTransient = opts != null && opts.getTransientLaunch() || (targetRootTask != null && targetRootTask.mTransitionController.isTransientHide(targetRootTask)); // Ensure the task/activity being brought forward is not the assistant and is not transient // 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 // was committed. pipCandidate.supportsEnterPipOnTaskSwitch = targetRootTask == null || !(targetRootTask.isActivityTypeAssistant() || isTransient); } /** Loading
services/core/java/com/android/server/wm/Transition.java +4 −0 Original line number Diff line number Diff line Loading @@ -1041,6 +1041,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { ar.getTaskFragment().startPausing(false /* uiSleeping */, null /* resuming */, "finishTransition"); } finally { // Didn't schedule for pip, clear the supportsEnterPipOnTaskSwitch flag. if (!ar.mPauseSchedulePendingForPip) { ar.supportsEnterPipOnTaskSwitch = false; } mController.mAtm.mTaskSupervisor.mUserLeaving = false; } // Return false anyway because there's no guarantee that the app will enter pip. Loading