Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a7b7c37 authored by Jerry Chang's avatar Jerry Chang Committed by Android (Google) Code Review
Browse files

Merge "Fix not able to launch activity adjacently" into sc-v2-dev

parents 53a2aa20 565c0b23
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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) {