diff --git a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java index e063b447be..ff701e756b 100644 --- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java @@ -561,7 +561,7 @@ public class SplitSelectStateController { new RemoteSplitLaunchTransitionRunner(firstTaskId, secondTaskId, callback); final RemoteTransition remoteTransition = new RemoteTransition(animationRunner, ActivityThread.currentActivityThread().getApplicationThread(), - "LaunchSplitPair"); + "LaunchAppFullscreen"); InstanceId instanceId = LogUtils.getShellShareableInstanceId().first; if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) { switch (launchData.getSplitLaunchType()) { diff --git a/quickstep/src/com/android/quickstep/views/GroupedTaskView.java b/quickstep/src/com/android/quickstep/views/GroupedTaskView.java index c91b18347c..01f6ae8d5c 100644 --- a/quickstep/src/com/android/quickstep/views/GroupedTaskView.java +++ b/quickstep/src/com/android/quickstep/views/GroupedTaskView.java @@ -223,11 +223,12 @@ public class GroupedTaskView extends TaskView { // Callbacks run from remote animation when recents animation not currently running InteractionJankMonitorWrapper.begin(this, InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER, "Enter form GroupedTaskView"); - launchTask(success -> { + launchTaskInternal(success -> { endCallback.executeAllAndDestroy(); InteractionJankMonitorWrapper.end( InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER); - }, false /* freezeTaskList */); + }, false /* freezeTaskList */, true /*launchingExistingTaskview*/); + // Callbacks get run from recentsView for case when recents animation already running recentsView.addSideTaskLaunchCallback(endCallback); @@ -236,7 +237,19 @@ public class GroupedTaskView extends TaskView { @Override public void launchTask(@NonNull Consumer callback, boolean isQuickswitch) { - getRecentsView().getSplitSelectController().launchExistingSplitPair(this, mTask.key.id, + launchTaskInternal(callback, isQuickswitch, false /*launchingExistingTaskview*/); + } + + /** + * @param launchingExistingTaskView {@link SplitSelectStateController#launchExistingSplitPair} + * uses existence of GroupedTaskView as control flow of how to animate in the incoming task. If + * we're launching from overview (from overview thumbnails) then pass in {@code true}, + * otherwise pass in {@code false} for case like quickswitching from home to task + */ + private void launchTaskInternal(@NonNull Consumer callback, boolean isQuickswitch, + boolean launchingExistingTaskView) { + getRecentsView().getSplitSelectController().launchExistingSplitPair( + launchingExistingTaskView ? this : null, mTask.key.id, mSecondaryTask.key.id, SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT, callback, isQuickswitch, getSplitRatio()); }