Remove stage concept from split screen APIs
Since split screen has transferred from stage-based model to app-pair model. Update to remove the stage concept from split screen APIs, so the caller won't need to deal with stage concept. Bug: 250875492 Test: atest WMShellFlickerTests Test: manual check start tasks or start intent/shortcut with task flow Change-Id: I36bfb54f3f690cfafd18ba31ab23f5745ead6d97
This commit is contained in:
1 parent
1aa91f0f7a
commit
e3f95693ef
2 files changed
+28
-36
No files matched your search
@@ -22,8 +22,6 @@ import static android.app.PendingIntent.FLAG_MUTABLE;
|
||||
import static com.android.launcher3.Utilities.postAsyncCallback;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.DEFAULT_SPLIT_RATIO;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.app.ActivityOptions;
|
||||
@@ -216,16 +214,12 @@ public class SplitSelectStateController {
|
||||
@Nullable InstanceId shellInstanceId) {
|
||||
TestLogging.recordEvent(
|
||||
TestProtocol.SEQUENCE_MAIN, "launchSplitTasks");
|
||||
// Assume initial task is for top/left part of screen
|
||||
final int[] taskIds = stagePosition == STAGE_POSITION_TOP_OR_LEFT
|
||||
? new int[]{taskId1, taskId2}
|
||||
: new int[]{taskId2, taskId1};
|
||||
if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
|
||||
RemoteSplitLaunchTransitionRunner animationRunner =
|
||||
new RemoteSplitLaunchTransitionRunner(taskId1, taskPendingIntent, taskId2,
|
||||
callback);
|
||||
mSystemUiProxy.startTasks(taskIds[0], null /* mainOptions */, taskIds[1],
|
||||
null /* sideOptions */, STAGE_POSITION_BOTTOM_OR_RIGHT, splitRatio,
|
||||
mSystemUiProxy.startTasks(taskId1, null /* options1 */, taskId2,
|
||||
null /* options2 */, stagePosition, splitRatio,
|
||||
new RemoteTransitionCompat(animationRunner, MAIN_EXECUTOR,
|
||||
ActivityThread.currentActivityThread().getApplicationThread()),
|
||||
shellInstanceId);
|
||||
@@ -239,24 +233,24 @@ public class SplitSelectStateController {
|
||||
300, 150,
|
||||
ActivityThread.currentActivityThread().getApplicationThread());
|
||||
|
||||
ActivityOptions mainOpts = ActivityOptions.makeBasic();
|
||||
ActivityOptions options1 = ActivityOptions.makeBasic();
|
||||
if (freezeTaskList) {
|
||||
mainOpts.setFreezeRecentTasksReordering();
|
||||
options1.setFreezeRecentTasksReordering();
|
||||
}
|
||||
if (taskPendingIntent == null) {
|
||||
mSystemUiProxy.startTasksWithLegacyTransition(taskIds[0], mainOpts.toBundle(),
|
||||
taskIds[1], null /* sideOptions */, STAGE_POSITION_BOTTOM_OR_RIGHT,
|
||||
splitRatio, adapter, shellInstanceId);
|
||||
mSystemUiProxy.startTasksWithLegacyTransition(taskId1, options1.toBundle(),
|
||||
taskId2, null /* options2 */, stagePosition, splitRatio, adapter,
|
||||
shellInstanceId);
|
||||
} else {
|
||||
final ShortcutInfo shortcutInfo = getShortcutInfo(mInitialTaskIntent,
|
||||
taskPendingIntent.getCreatorUserHandle());
|
||||
if (shortcutInfo != null) {
|
||||
mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo, taskId2,
|
||||
mainOpts.toBundle(), null /* sideOptions */, stagePosition, splitRatio,
|
||||
adapter, shellInstanceId);
|
||||
mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo,
|
||||
options1.toBundle(), taskId2, null /* options2 */, stagePosition,
|
||||
splitRatio, adapter, shellInstanceId);
|
||||
} else {
|
||||
mSystemUiProxy.startIntentAndTaskWithLegacyTransition(taskPendingIntent,
|
||||
fillInIntent, taskId2, mainOpts.toBundle(), null /* sideOptions */,
|
||||
fillInIntent, options1.toBundle(), taskId2, null /* options2 */,
|
||||
stagePosition, splitRatio, adapter, shellInstanceId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user