Prevent passing in GroupedTaskView when not animating split launch am: 8082401a83

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23910406

Change-Id: I5cba930c740bac29dd12c615510c76130d52938a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vinit Nayak
2023-07-06 04:43:45 +00:00
committed by Automerger Merge Worker
2 changed files with 17 additions and 4 deletions
@@ -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()) {
@@ -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<Boolean> 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<Boolean> 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());
}