Loading quickstep/src/com/android/quickstep/SystemUiProxy.java +28 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,34 @@ public class SystemUiProxy implements ISystemUiProxy { } } public void startIntentAndTask(PendingIntent pendingIntent, Intent fillInIntent, Bundle options1, int taskId, Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio, RemoteTransitionCompat remoteTransition, InstanceId instanceId) { if (mSystemUiProxy != null) { try { mSplitScreen.startIntentAndTask(pendingIntent, fillInIntent, options1, taskId, options2, splitPosition, splitRatio, remoteTransition.getTransition(), instanceId); } catch (RemoteException e) { Log.w(TAG, "Failed call startIntentAndTask"); } } } public void startShortcutAndTask(ShortcutInfo shortcutInfo, Bundle options1, int taskId, Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio, RemoteTransitionCompat remoteTransition, InstanceId instanceId) { if (mSystemUiProxy != null) { try { mSplitScreen.startShortcutAndTask(shortcutInfo, options1, taskId, options2, splitPosition, splitRatio, remoteTransition.getTransition(), instanceId); } catch (RemoteException e) { Log.w(TAG, "Failed call startShortcutAndTask"); } } } /** * Start multiple tasks in split-screen simultaneously. */ Loading quickstep/src/com/android/quickstep/TaskViewUtils.java +4 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.quickstep; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -425,8 +424,10 @@ public final class TaskViewUtils { TransitionInfo.Change splitRoot2 = null; for (int i = 0; i < transitionInfo.getChanges().size(); ++i) { final TransitionInfo.Change change = transitionInfo.getChanges().get(i); final int taskId = change.getTaskInfo() != null ? change.getTaskInfo().taskId : -1; if (change.getTaskInfo() == null) continue; final int taskId = change.getTaskInfo().taskId; final int mode = change.getMode(); // Find the target tasks' root tasks since those are the split stages that need to // be animated (the tasks themselves are children and thus inherit animation). if (taskId == initialTaskId || taskId == secondTaskId) { Loading @@ -439,7 +440,7 @@ public final class TaskViewUtils { + "root of " + taskId + " is already visible or has broken hierarchy."); } } if (taskId == initialTaskId && initialTaskId != INVALID_TASK_ID) { if (taskId == initialTaskId) { splitRoot1 = transitionInfo.getChange(change.getParent()); } if (taskId == secondTaskId) { Loading quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +26 −12 Original line number Diff line number Diff line Loading @@ -214,18 +214,36 @@ public class SplitSelectStateController { @Nullable InstanceId shellInstanceId) { TestLogging.recordEvent( TestProtocol.SEQUENCE_MAIN, "launchSplitTasks"); final ActivityOptions options1 = ActivityOptions.makeBasic(); if (freezeTaskList) { options1.setFreezeRecentTasksReordering(); } if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) { RemoteSplitLaunchTransitionRunner animationRunner = final RemoteSplitLaunchTransitionRunner animationRunner = new RemoteSplitLaunchTransitionRunner(taskId1, taskPendingIntent, taskId2, callback); mSystemUiProxy.startTasks(taskId1, null /* options1 */, taskId2, null /* options2 */, stagePosition, splitRatio, new RemoteTransitionCompat(animationRunner, MAIN_EXECUTOR, ActivityThread.currentActivityThread().getApplicationThread()), final RemoteTransitionCompat remoteTransition = new RemoteTransitionCompat( animationRunner, MAIN_EXECUTOR, ActivityThread.currentActivityThread().getApplicationThread()); if (taskPendingIntent == null) { mSystemUiProxy.startTasks(taskId1, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); // TODO(b/237635859): handle intent/shortcut + task with shell transition } else { RemoteSplitLaunchAnimationRunner animationRunner = final ShortcutInfo shortcutInfo = getShortcutInfo(mInitialTaskIntent, taskPendingIntent.getCreatorUserHandle()); if (shortcutInfo != null) { mSystemUiProxy.startShortcutAndTask(shortcutInfo, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else { mSystemUiProxy.startIntentAndTask(taskPendingIntent, fillInIntent, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } } } else { final RemoteSplitLaunchAnimationRunner animationRunner = new RemoteSplitLaunchAnimationRunner(taskId1, taskPendingIntent, taskId2, callback); final RemoteAnimationAdapter adapter = new RemoteAnimationAdapter( Loading @@ -233,10 +251,6 @@ public class SplitSelectStateController { 300, 150, ActivityThread.currentActivityThread().getApplicationThread()); ActivityOptions options1 = ActivityOptions.makeBasic(); if (freezeTaskList) { options1.setFreezeRecentTasksReordering(); } if (taskPendingIntent == null) { mSystemUiProxy.startTasksWithLegacyTransition(taskId1, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, adapter, Loading Loading
quickstep/src/com/android/quickstep/SystemUiProxy.java +28 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,34 @@ public class SystemUiProxy implements ISystemUiProxy { } } public void startIntentAndTask(PendingIntent pendingIntent, Intent fillInIntent, Bundle options1, int taskId, Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio, RemoteTransitionCompat remoteTransition, InstanceId instanceId) { if (mSystemUiProxy != null) { try { mSplitScreen.startIntentAndTask(pendingIntent, fillInIntent, options1, taskId, options2, splitPosition, splitRatio, remoteTransition.getTransition(), instanceId); } catch (RemoteException e) { Log.w(TAG, "Failed call startIntentAndTask"); } } } public void startShortcutAndTask(ShortcutInfo shortcutInfo, Bundle options1, int taskId, Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio, RemoteTransitionCompat remoteTransition, InstanceId instanceId) { if (mSystemUiProxy != null) { try { mSplitScreen.startShortcutAndTask(shortcutInfo, options1, taskId, options2, splitPosition, splitRatio, remoteTransition.getTransition(), instanceId); } catch (RemoteException e) { Log.w(TAG, "Failed call startShortcutAndTask"); } } } /** * Start multiple tasks in split-screen simultaneously. */ Loading
quickstep/src/com/android/quickstep/TaskViewUtils.java +4 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.quickstep; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -425,8 +424,10 @@ public final class TaskViewUtils { TransitionInfo.Change splitRoot2 = null; for (int i = 0; i < transitionInfo.getChanges().size(); ++i) { final TransitionInfo.Change change = transitionInfo.getChanges().get(i); final int taskId = change.getTaskInfo() != null ? change.getTaskInfo().taskId : -1; if (change.getTaskInfo() == null) continue; final int taskId = change.getTaskInfo().taskId; final int mode = change.getMode(); // Find the target tasks' root tasks since those are the split stages that need to // be animated (the tasks themselves are children and thus inherit animation). if (taskId == initialTaskId || taskId == secondTaskId) { Loading @@ -439,7 +440,7 @@ public final class TaskViewUtils { + "root of " + taskId + " is already visible or has broken hierarchy."); } } if (taskId == initialTaskId && initialTaskId != INVALID_TASK_ID) { if (taskId == initialTaskId) { splitRoot1 = transitionInfo.getChange(change.getParent()); } if (taskId == secondTaskId) { Loading
quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +26 −12 Original line number Diff line number Diff line Loading @@ -214,18 +214,36 @@ public class SplitSelectStateController { @Nullable InstanceId shellInstanceId) { TestLogging.recordEvent( TestProtocol.SEQUENCE_MAIN, "launchSplitTasks"); final ActivityOptions options1 = ActivityOptions.makeBasic(); if (freezeTaskList) { options1.setFreezeRecentTasksReordering(); } if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) { RemoteSplitLaunchTransitionRunner animationRunner = final RemoteSplitLaunchTransitionRunner animationRunner = new RemoteSplitLaunchTransitionRunner(taskId1, taskPendingIntent, taskId2, callback); mSystemUiProxy.startTasks(taskId1, null /* options1 */, taskId2, null /* options2 */, stagePosition, splitRatio, new RemoteTransitionCompat(animationRunner, MAIN_EXECUTOR, ActivityThread.currentActivityThread().getApplicationThread()), final RemoteTransitionCompat remoteTransition = new RemoteTransitionCompat( animationRunner, MAIN_EXECUTOR, ActivityThread.currentActivityThread().getApplicationThread()); if (taskPendingIntent == null) { mSystemUiProxy.startTasks(taskId1, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); // TODO(b/237635859): handle intent/shortcut + task with shell transition } else { RemoteSplitLaunchAnimationRunner animationRunner = final ShortcutInfo shortcutInfo = getShortcutInfo(mInitialTaskIntent, taskPendingIntent.getCreatorUserHandle()); if (shortcutInfo != null) { mSystemUiProxy.startShortcutAndTask(shortcutInfo, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else { mSystemUiProxy.startIntentAndTask(taskPendingIntent, fillInIntent, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } } } else { final RemoteSplitLaunchAnimationRunner animationRunner = new RemoteSplitLaunchAnimationRunner(taskId1, taskPendingIntent, taskId2, callback); final RemoteAnimationAdapter adapter = new RemoteAnimationAdapter( Loading @@ -233,10 +251,6 @@ public class SplitSelectStateController { 300, 150, ActivityThread.currentActivityThread().getApplicationThread()); ActivityOptions options1 = ActivityOptions.makeBasic(); if (freezeTaskList) { options1.setFreezeRecentTasksReordering(); } if (taskPendingIntent == null) { mSystemUiProxy.startTasksWithLegacyTransition(taskId1, options1.toBundle(), taskId2, null /* options2 */, stagePosition, splitRatio, adapter, Loading