Merge "Revert^2 Do not enter pip during transient launch" into udc-qpr-dev am: 05b23f1e52
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24124445 Change-Id: I7ac06f553646da6f30509c63f69742e0b571afb9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user