Merge "Fix not able to launch activity adjacently" into sc-v2-dev
This commit is contained in:
@@ -781,6 +781,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
// Make the stages adjacent to each other so they occlude what's behind them.
|
||||
wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token);
|
||||
wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token);
|
||||
mTaskOrganizer.applyTransaction(wct);
|
||||
}
|
||||
}
|
||||
@@ -788,6 +789,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
private void onStageRootTaskVanished(StageListenerImpl stageListener) {
|
||||
if (stageListener == mMainStageListener || stageListener == mSideStageListener) {
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
wct.clearLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token);
|
||||
// Deactivate the main stage if it no longer has a root task.
|
||||
mMainStage.deactivate(wct);
|
||||
mTaskOrganizer.applyTransaction(wct);
|
||||
|
||||
@@ -2741,8 +2741,8 @@ class ActivityStarter {
|
||||
// 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 */,
|
||||
mSourceRootTask, 0 /** launchFlags */);
|
||||
mTargetRootTask.getActivityType(), null /** options */, mSourceRootTask,
|
||||
mLaunchFlags);
|
||||
// If target root task is created by organizer, let organizer handle reparent itself.
|
||||
if (!mTargetRootTask.mCreatedByOrganizer && launchRootTask != null
|
||||
&& launchRootTask != mTargetRootTask) {
|
||||
|
||||
Reference in New Issue
Block a user