Let root task can reparent to launch root task while launch
When task move to back, we had some mechanism to make sure it is under task display area or home task parent for legacy split. For stage split, we should add reparent mechanism when task bring to front to ensure task is under launch root stage(main stage) otherwise it will launch as full screen and split dismissed. Fix: 198554517 Test: manual Test: pass existing tests Change-Id: I6ded3d3fa2acc48a8b248b20f6d34b34d5387776
This commit is contained in:
@@ -2722,6 +2722,17 @@ class ActivityStarter {
|
||||
mTargetRootTask = intentActivity.getRootTask();
|
||||
mSupervisor.handleNonResizableTaskIfNeeded(intentTask, WINDOWING_MODE_UNDEFINED,
|
||||
mRootWindowContainer.getDefaultTaskDisplayArea(), mTargetRootTask);
|
||||
|
||||
// We need to check if there is a launch root task in TDA for this target root task.
|
||||
// If it exist, we need to reparent target root task from TDA to launch root task.
|
||||
final TaskDisplayArea tda = mTargetRootTask.getDisplayArea();
|
||||
final Task launchRootTask = tda.getLaunchRootTask(mTargetRootTask.getWindowingMode(),
|
||||
mTargetRootTask.getActivityType(), null /** options */, null /** sourceTask */,
|
||||
0 /** launchFlags */);
|
||||
if (launchRootTask != null && launchRootTask != mTargetRootTask) {
|
||||
mTargetRootTask.reparent(launchRootTask, POSITION_TOP);
|
||||
mTargetRootTask = launchRootTask;
|
||||
}
|
||||
}
|
||||
|
||||
private void resumeTargetRootTaskIfNeeded() {
|
||||
|
||||
Reference in New Issue
Block a user