Merge "Update Pip launches to not enter pinned task if in background." into tm-dev am: 94ec86fed0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23389120

Change-Id: I9a8362b426af4eba8365388bf2cb9751c4cf981b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-05-30 12:45:02 +00:00
committed by Automerger Merge Worker

View File

@@ -1946,7 +1946,8 @@ class ActivityStarter {
// If Activity's launching into PiP, move the mStartActivity immediately to pinned mode. // If Activity's launching into PiP, move the mStartActivity immediately to pinned mode.
// Note that mStartActivity and source should be in the same Task at this point. // Note that mStartActivity and source should be in the same Task at this point.
if (mOptions != null && mOptions.isLaunchIntoPip() if (mOptions != null && mOptions.isLaunchIntoPip()
&& sourceRecord != null && sourceRecord.getTask() == mStartActivity.getTask()) { && sourceRecord != null && sourceRecord.getTask() == mStartActivity.getTask()
&& !mRestrictedBgActivity) {
mRootWindowContainer.moveActivityToPinnedRootTask(mStartActivity, mRootWindowContainer.moveActivityToPinnedRootTask(mStartActivity,
sourceRecord, "launch-into-pip"); sourceRecord, "launch-into-pip");
} }