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();
|
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||||
// Make the stages adjacent to each other so they occlude what's behind them.
|
// Make the stages adjacent to each other so they occlude what's behind them.
|
||||||
wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token);
|
wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token);
|
||||||
|
wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token);
|
||||||
mTaskOrganizer.applyTransaction(wct);
|
mTaskOrganizer.applyTransaction(wct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -788,6 +789,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
private void onStageRootTaskVanished(StageListenerImpl stageListener) {
|
private void onStageRootTaskVanished(StageListenerImpl stageListener) {
|
||||||
if (stageListener == mMainStageListener || stageListener == mSideStageListener) {
|
if (stageListener == mMainStageListener || stageListener == mSideStageListener) {
|
||||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||||
|
wct.clearLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token);
|
||||||
// Deactivate the main stage if it no longer has a root task.
|
// Deactivate the main stage if it no longer has a root task.
|
||||||
mMainStage.deactivate(wct);
|
mMainStage.deactivate(wct);
|
||||||
mTaskOrganizer.applyTransaction(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.
|
// If it exist, we need to reparent target root task from TDA to launch root task.
|
||||||
final TaskDisplayArea tda = mTargetRootTask.getDisplayArea();
|
final TaskDisplayArea tda = mTargetRootTask.getDisplayArea();
|
||||||
final Task launchRootTask = tda.getLaunchRootTask(mTargetRootTask.getWindowingMode(),
|
final Task launchRootTask = tda.getLaunchRootTask(mTargetRootTask.getWindowingMode(),
|
||||||
mTargetRootTask.getActivityType(), null /** options */,
|
mTargetRootTask.getActivityType(), null /** options */, mSourceRootTask,
|
||||||
mSourceRootTask, 0 /** launchFlags */);
|
mLaunchFlags);
|
||||||
// If target root task is created by organizer, let organizer handle reparent itself.
|
// If target root task is created by organizer, let organizer handle reparent itself.
|
||||||
if (!mTargetRootTask.mCreatedByOrganizer && launchRootTask != null
|
if (!mTargetRootTask.mCreatedByOrganizer && launchRootTask != null
|
||||||
&& launchRootTask != mTargetRootTask) {
|
&& launchRootTask != mTargetRootTask) {
|
||||||
|
|||||||
Reference in New Issue
Block a user