diff options
3 files changed, 21 insertions, 3 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java index 917465f63..f8d454f34 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java @@ -52,6 +52,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.logging.UserEventDispatcher; +import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; @@ -182,6 +183,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { super(context, attrs, defStyleAttr); mActivity = BaseDraggingActivity.fromContext(context); setOnClickListener((view) -> { + if (com.android.launcher3.testing.TestProtocol.sDebugTracing) { + android.util.Log.d(TestProtocol.NO_START_TASK_TAG, "TaskView onClick"); + } if (getTask() == null) { return; } @@ -285,6 +289,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { public void launchTask(boolean animate, boolean freezeTaskList, Consumer<Boolean> resultCallback, Handler resultCallbackHandler) { + if (com.android.launcher3.testing.TestProtocol.sDebugTracing) { + android.util.Log.d(TestProtocol.NO_START_TASK_TAG, "launchTask"); + } if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { if (isRunningTask()) { getRecentsView().finishRecentsAnimation(false /* toRecents */, @@ -299,6 +306,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { private void launchTaskInternal(boolean animate, boolean freezeTaskList, Consumer<Boolean> resultCallback, Handler resultCallbackHandler) { + if (com.android.launcher3.testing.TestProtocol.sDebugTracing) { + android.util.Log.d(TestProtocol.NO_START_TASK_TAG, "launchTaskInternal"); + } if (mTask != null) { final ActivityOptions opts; if (animate) { diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java index aff7861a8..99efb22cf 100644 --- a/src/com/android/launcher3/testing/TestProtocol.java +++ b/src/com/android/launcher3/testing/TestProtocol.java @@ -71,4 +71,5 @@ public final class TestProtocol { public static final String NO_ALLAPPS_EVENT_TAG = "b/133867119"; public static final String NO_DRAG_TAG = "b/133009122"; public static final String NO_START_TAG = "b/132900132"; + public static final String NO_START_TASK_TAG = "b/133765434"; } diff --git a/tests/tapl/com/android/launcher3/tapl/OverviewTask.java b/tests/tapl/com/android/launcher3/tapl/OverviewTask.java index 2ea76185e..8b124641f 100644 --- a/tests/tapl/com/android/launcher3/tapl/OverviewTask.java +++ b/tests/tapl/com/android/launcher3/tapl/OverviewTask.java @@ -20,6 +20,8 @@ import androidx.test.uiautomator.Direction; import androidx.test.uiautomator.UiObject2; import androidx.test.uiautomator.Until; +import com.android.launcher3.testing.TestProtocol; + /** * A recent task in the overview panel carousel. */ @@ -59,9 +61,14 @@ public final class OverviewTask { */ public Background open() { verifyActiveContainer(); - mLauncher.assertTrue("Launching task didn't open a new window: " + - mTask.getParent().getContentDescription(), - mTask.clickAndWait(Until.newWindow(), WAIT_TIME_MS)); + mLauncher.getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); + try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( + "clicking an overview task")) { + mLauncher.assertTrue("Launching task didn't open a new window: " + + mTask.getParent().getContentDescription(), + mTask.clickAndWait(Until.newWindow(), WAIT_TIME_MS)); + } + mLauncher.getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); return new Background(mLauncher); } } |