Merge "Fix empty side stage after dropping foreground app icon to split" into sc-v2-dev
This commit is contained in:
@@ -375,7 +375,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
if (options == null) {
|
if (options == null) {
|
||||||
options = new Bundle();
|
options = new Bundle();
|
||||||
}
|
}
|
||||||
updateActivityOptions(options, position, wct);
|
updateActivityOptions(options, position);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case STAGE_TYPE_MAIN: {
|
case STAGE_TYPE_MAIN: {
|
||||||
@@ -390,7 +390,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
if (options == null) {
|
if (options == null) {
|
||||||
options = new Bundle();
|
options = new Bundle();
|
||||||
}
|
}
|
||||||
updateActivityOptions(options, position, wct);
|
updateActivityOptions(options, position);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -491,22 +491,8 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
opts.putParcelable(KEY_LAUNCH_ROOT_TASK_TOKEN, stage.mRootTaskInfo.token);
|
opts.putParcelable(KEY_LAUNCH_ROOT_TASK_TOKEN, stage.mRootTaskInfo.token);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateActivityOptions(Bundle opts, @SplitPosition int position,
|
void updateActivityOptions(Bundle opts, @SplitPosition int position) {
|
||||||
@Nullable WindowContainerTransaction wct) {
|
|
||||||
addActivityOptions(opts, position == mSideStagePosition ? mSideStage : mMainStage);
|
addActivityOptions(opts, position == mSideStagePosition ? mSideStage : mMainStage);
|
||||||
|
|
||||||
if (!mMainStage.isActive()) {
|
|
||||||
// Activate the main stage in anticipation of an app launch.
|
|
||||||
boolean needsApply = wct == null;
|
|
||||||
if (needsApply) {
|
|
||||||
wct = new WindowContainerTransaction();
|
|
||||||
}
|
|
||||||
mMainStage.activate(getMainStageBounds(), wct);
|
|
||||||
mSideStage.setBounds(getSideStageBounds(), wct);
|
|
||||||
if (needsApply) {
|
|
||||||
mTaskOrganizer.applyTransaction(wct);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void registerSplitScreenListener(SplitScreen.SplitScreenListener listener) {
|
void registerSplitScreenListener(SplitScreen.SplitScreenListener listener) {
|
||||||
|
|||||||
Reference in New Issue
Block a user