Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +10 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading Loading @@ -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 */, Loading @@ -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) { Loading src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -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"; } tests/tapl/com/android/launcher3/tapl/OverviewTask.java +10 −3 Original line number Diff line number Diff line Loading @@ -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. */ Loading Loading @@ -59,9 +61,14 @@ public final class OverviewTask { */ public Background open() { verifyActiveContainer(); 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); } } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +10 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading Loading @@ -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 */, Loading @@ -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) { Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -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"; }
tests/tapl/com/android/launcher3/tapl/OverviewTask.java +10 −3 Original line number Diff line number Diff line Loading @@ -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. */ Loading Loading @@ -59,9 +61,14 @@ public final class OverviewTask { */ public Background open() { verifyActiveContainer(); 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); } }