From 03815e6c79ba1972d38f2ac0b5447fd4fa3a0413 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Thu, 2 Feb 2023 17:41:29 +0800 Subject: [PATCH] Create TAPL test suite for splitscreen This patch creates a new file, TaplTestsSplitscreen.java, containing one TAPL test sequence. testSplitAppFromHomeWithItself() tests the user flow of splitting from home using an app that is already running, and then selecting the app itself again as a split target from the Taskbar. The expected result is that Launcher shows an error message gracefully and does not crash. Fixes: 267554450 Test: Ran test file locally and verified that it passes. Change-Id: I98a1e3a4143d10a6572175711059b3a77aa5dcd0 --- .../android/quickstep/views/RecentsView.java | 3 + .../quickstep/TaplTestsSplitscreen.java | 78 +++++++++++++++++++ .../android/launcher3/tapl/AppIconMenu.java | 9 +++ .../android/launcher3/tapl/Launchable.java | 21 +++++ .../android/launcher3/tapl/OverviewTask.java | 7 +- .../launcher3/tapl/SplitScreenMenuItem.java | 55 +++++++++++++ 6 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java create mode 100644 tests/tapl/com/android/launcher3/tapl/SplitScreenMenuItem.java diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 843b2fbd5d..f18f268bf5 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -147,6 +147,8 @@ import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.statemanager.BaseState; import com.android.launcher3.statemanager.StatefulActivity; +import com.android.launcher3.testing.TestLogging; +import com.android.launcher3.testing.shared.TestProtocol; import com.android.launcher3.touch.OverScroll; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.DynamicResource; @@ -4462,6 +4464,7 @@ public abstract class RecentsView