Merge "Support to launch the matching task into a closer adjacent target task" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e6834970ac
@@ -2754,17 +2754,15 @@ class ActivityStarter {
|
|||||||
mTargetRootTask = getOrCreateRootTask(mStartActivity, mLaunchFlags, intentTask,
|
mTargetRootTask = getOrCreateRootTask(mStartActivity, mLaunchFlags, intentTask,
|
||||||
mOptions);
|
mOptions);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
// If a launch target indicated, and the matching task is already in the adjacent task
|
|
||||||
// of the launch target. Adjust to use the adjacent task as its launch target. So the
|
// If the matching task is already in the adjacent task of the launch target. Adjust to use
|
||||||
// existing task will be launched into the closer one and won't be reparent redundantly.
|
// the adjacent task as its launch target. So the existing task will be launched into the
|
||||||
// TODO(b/231541706): Migrate the logic to wm-shell after having proper APIs to help
|
// closer one and won't be reparent redundantly.
|
||||||
// resolve target task without actually starting the activity.
|
final Task adjacentTargetTask = mTargetRootTask.getAdjacentTaskFragment() != null
|
||||||
final Task adjacentTargetTask = mTargetRootTask.getAdjacentTaskFragment() != null
|
? mTargetRootTask.getAdjacentTaskFragment().asTask() : null;
|
||||||
? mTargetRootTask.getAdjacentTaskFragment().asTask() : null;
|
if (adjacentTargetTask != null && intentActivity.isDescendantOf(adjacentTargetTask)) {
|
||||||
if (adjacentTargetTask != null && intentActivity.isDescendantOf(adjacentTargetTask)) {
|
mTargetRootTask = adjacentTargetTask;
|
||||||
mTargetRootTask = adjacentTargetTask;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the target task is not in the front, then we need to bring it to the front...
|
// If the target task is not in the front, then we need to bring it to the front...
|
||||||
|
|||||||
Reference in New Issue
Block a user