Remove the validation check when enter split
Remove the validation checking first before we fix the PiP-to-Split case. The validation checking is to prevent entering the unexpected state in split when launched by adb with activity_adjacent flag.2369dfab4f,e9c7b90a38, already fixed it from wm-core. We can do the validation checking from split after. Bug: 240652871 Test: 1. Launch app from recent app. 2. Drag app to split from task bar. Change-Id: Ia61f91dd2d505cc8b0d4f8194798b16222253ce4
This commit is contained in:
@@ -1376,21 +1376,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
}
|
||||
}
|
||||
} else if (isSideStage && hasChildren && !mMainStage.isActive()) {
|
||||
if (mFocusingTaskInfo != null && !isValidToEnterSplitScreen(mFocusingTaskInfo)) {
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
mSideStage.removeAllTasks(wct, true);
|
||||
wct.reorder(mRootTaskInfo.token, false /* onTop */);
|
||||
mTaskOrganizer.applyTransaction(wct);
|
||||
Slog.i(TAG, "cancel entering split screen, reason = "
|
||||
+ exitReasonToString(EXIT_REASON_APP_DOES_NOT_SUPPORT_MULTIWINDOW));
|
||||
} else {
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
mSplitLayout.init();
|
||||
prepareEnterSplitScreen(wct);
|
||||
mSyncQueue.queue(wct);
|
||||
mSyncQueue.runInSync(t ->
|
||||
updateSurfaceBounds(mSplitLayout, t, false /* applyResizingOffset */));
|
||||
}
|
||||
// TODO (b/238697912) : Add the validation to prevent entering non-recovered status
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
mSplitLayout.init();
|
||||
prepareEnterSplitScreen(wct);
|
||||
mSyncQueue.queue(wct);
|
||||
mSyncQueue.runInSync(t ->
|
||||
updateSurfaceBounds(mSplitLayout, t, false /* applyResizingOffset */));
|
||||
}
|
||||
if (mMainStageListener.mHasChildren && mSideStageListener.mHasChildren) {
|
||||
mShouldUpdateRecents = true;
|
||||
|
||||
Reference in New Issue
Block a user