Loading services/core/java/com/android/server/wm/Task.java +12 −8 Original line number Diff line number Diff line Loading @@ -5255,17 +5255,21 @@ 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. final Task targetRootTask = toFrontTask != null ? toFrontTask.getRootTask() : toFrontActivity != null ? toFrontActivity.getRootTask() : null; if (targetRootTask == null) { Slog.e(TAG, "No root task for enter pip, both to front task and activity are null?"); return; } pipCandidate.supportsEnterPipOnTaskSwitch = true; final boolean isTransient = opts != null && opts.getTransientLaunch() || (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.isActivityTypeAssistant() && !isTransient; } /** Loading Loading
services/core/java/com/android/server/wm/Task.java +12 −8 Original line number Diff line number Diff line Loading @@ -5255,17 +5255,21 @@ 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. final Task targetRootTask = toFrontTask != null ? toFrontTask.getRootTask() : toFrontActivity != null ? toFrontActivity.getRootTask() : null; if (targetRootTask == null) { Slog.e(TAG, "No root task for enter pip, both to front task and activity are null?"); return; } pipCandidate.supportsEnterPipOnTaskSwitch = true; final boolean isTransient = opts != null && opts.getTransientLaunch() || (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.isActivityTypeAssistant() && !isTransient; } /** Loading