From 3d293c432a1d29661f45c4ba16bd9fdf33e80131 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Tue, 18 Jul 2023 17:17:18 -0700 Subject: [PATCH] Add test logs for animating in split launch Bug: 288939273 Change-Id: Ib1728d859f33fa3f673f67eca754ec9813b0562b --- quickstep/src/com/android/quickstep/TaskViewUtils.java | 9 ++++++++- .../quickstep/util/SplitSelectStateController.java | 3 +++ .../android/launcher3/testing/shared/TestProtocol.java | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/TaskViewUtils.java b/quickstep/src/com/android/quickstep/TaskViewUtils.java index 538aba9e21..2d5b8db18d 100644 --- a/quickstep/src/com/android/quickstep/TaskViewUtils.java +++ b/quickstep/src/com/android/quickstep/TaskViewUtils.java @@ -38,6 +38,8 @@ import static com.android.launcher3.QuickstepTransitionManager.RECENTS_LAUNCH_DU import static com.android.launcher3.QuickstepTransitionManager.SPLIT_DIVIDER_ANIM_DURATION; import static com.android.launcher3.QuickstepTransitionManager.SPLIT_LAUNCH_DURATION; import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncestor; +import static com.android.launcher3.testing.shared.TestProtocol.LAUNCH_SPLIT_PAIR; +import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import static com.android.launcher3.util.MultiPropertyFactory.MULTI_PROPERTY_VALUE; import static com.android.quickstep.views.DesktopTaskView.DESKTOP_MODE_SUPPORTED; @@ -431,6 +433,7 @@ public final class TaskViewUtils { int initialTaskId, int secondTaskId, @NonNull TransitionInfo transitionInfo, SurfaceControl.Transaction t, @NonNull Runnable finishCallback) { if (launchingTaskView != null) { + testLogD(LAUNCH_SPLIT_PAIR, "composeRecentsSplitLaunchAnimator taskView not-null"); AnimatorSet animatorSet = new AnimatorSet(); animatorSet.addListener(new AnimatorListenerAdapter() { @Override @@ -463,7 +466,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); - if (change.getTaskInfo() == null) continue; + if (change.getTaskInfo() == null) { + testLogD(LAUNCH_SPLIT_PAIR, "changeTaskInfo null; change: " + change); + continue; + } final int taskId = change.getTaskInfo().taskId; final int mode = change.getMode(); @@ -499,6 +505,7 @@ public final class TaskViewUtils { private static void animateSplitRoot(SurfaceControl.Transaction t, TransitionInfo.Change splitRoot) { + testLogD(LAUNCH_SPLIT_PAIR, "animateSplitRoot: " + splitRoot); if (splitRoot != null) { t.show(splitRoot.getLeash()); t.setAlpha(splitRoot.getLeash(), 1.f); diff --git a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java index fc6a16092d..7ba6d4277c 100644 --- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java @@ -17,6 +17,8 @@ package com.android.quickstep.util; import static com.android.launcher3.Utilities.postAsyncCallback; +import static com.android.launcher3.testing.shared.TestProtocol.LAUNCH_SPLIT_PAIR; +import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.SplitConfigurationOptions.DEFAULT_SPLIT_RATIO; import static com.android.quickstep.util.SplitSelectDataHolder.SPLIT_PENDINGINTENT_PENDINGINTENT; @@ -522,6 +524,7 @@ public class SplitSelectStateController { public void startAnimation(IBinder transition, TransitionInfo info, SurfaceControl.Transaction t, IRemoteTransitionFinishedCallback finishedCallback) { + testLogD(LAUNCH_SPLIT_PAIR, "Received split startAnimation"); final Runnable finishAdapter = () -> { try { finishedCallback.onTransitionFinished(null /* wct */, null /* sct */); diff --git a/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java b/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java index 4073517b5e..1e2447afe8 100644 --- a/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java +++ b/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java @@ -157,6 +157,7 @@ public final class TestProtocol { public static final String TWO_TASKBAR_LONG_CLICKS = "b/262282528"; public static final String FLAKY_ACTIVITY_COUNT = "b/260260325"; public static final String ICON_MISSING = "b/282963545"; + public static final String LAUNCH_SPLIT_PAIR = "b/288939273"; public static final String REQUEST_EMULATE_DISPLAY = "emulate-display"; public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";