Loading quickstep/tests/src/com/android/quickstep/StartLauncherViaGestureTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; import com.android.launcher3.Launcher; import com.android.launcher3.ui.TaplTestsLauncher3; import com.android.launcher3.util.RaceConditionReproducer; import com.android.quickstep.NavigationModeSwitchRule.Mode; import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch; Loading @@ -45,6 +46,7 @@ public class StartLauncherViaGestureTests extends AbstractQuickStepTest { @Before public void setUp() throws Exception { super.setUp(); TaplTestsLauncher3.initialize(this); // b/143488140 mLauncher.pressHome(); // Start an activity where the gestures start. Loading tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,9 @@ public abstract class AbstractLauncherUiTest { } public static void checkDetectedLeaks(LauncherInstrumentation launcher) { // TODO(b/191449914): Temporarily disable leak detection on tablets until bug is resolved. if (launcher.isTablet()) return; if (sActivityLeakReported) return; if (sStrictmodeDetectedActivityLeak != null) { Loading tests/tapl/com/android/launcher3/tapl/Background.java +18 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,12 @@ public class Background extends LauncherInstrumentation.VisibleContainer { } case THREE_BUTTON: if (mLauncher.isTablet()) { mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN); mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP); } mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, SQUARE_BUTTON_EVENT); mLauncher.runToState( () -> mLauncher.waitForNavigationUiObject("recent_apps").click(), Loading Loading @@ -225,9 +231,21 @@ public class Background extends LauncherInstrumentation.VisibleContainer { case THREE_BUTTON: // Double press the recents button. UiObject2 recentsButton = mLauncher.waitForNavigationUiObject("recent_apps"); if (mLauncher.isTablet()) { mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN); mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP); } mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, SQUARE_BUTTON_EVENT); mLauncher.runToState(() -> recentsButton.click(), OVERVIEW_STATE_ORDINAL); mLauncher.getOverview(); if (mLauncher.isTablet()) { mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN); mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP); } mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, SQUARE_BUTTON_EVENT); mLauncher.executeAndWaitForEvent( () -> recentsButton.click(), Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +6 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,8 @@ public final class LauncherInstrumentation { private static final int ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME = 20; private static final int GESTURE_STEP_MS = 16; private static final Pattern EVENT_TOUCH_DOWN = getTouchEventPattern("ACTION_DOWN"); private static final Pattern EVENT_TOUCH_UP = getTouchEventPattern("ACTION_UP"); static final Pattern EVENT_TOUCH_DOWN = getTouchEventPattern("ACTION_DOWN"); static final Pattern EVENT_TOUCH_UP = getTouchEventPattern("ACTION_UP"); private static final Pattern EVENT_TOUCH_CANCEL = getTouchEventPattern("ACTION_CANCEL"); private static final Pattern EVENT_PILFER_POINTERS = Pattern.compile("pilferPointers"); static final Pattern EVENT_START = Pattern.compile("start:"); Loading Loading @@ -750,6 +750,10 @@ public final class LauncherInstrumentation { expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS); expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_UP_TIS); } if (isTablet()) { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN); expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_UP); } runToState( waitForNavigationUiObject("home")::click, Loading Loading
quickstep/tests/src/com/android/quickstep/StartLauncherViaGestureTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; import com.android.launcher3.Launcher; import com.android.launcher3.ui.TaplTestsLauncher3; import com.android.launcher3.util.RaceConditionReproducer; import com.android.quickstep.NavigationModeSwitchRule.Mode; import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch; Loading @@ -45,6 +46,7 @@ public class StartLauncherViaGestureTests extends AbstractQuickStepTest { @Before public void setUp() throws Exception { super.setUp(); TaplTestsLauncher3.initialize(this); // b/143488140 mLauncher.pressHome(); // Start an activity where the gestures start. Loading
tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,9 @@ public abstract class AbstractLauncherUiTest { } public static void checkDetectedLeaks(LauncherInstrumentation launcher) { // TODO(b/191449914): Temporarily disable leak detection on tablets until bug is resolved. if (launcher.isTablet()) return; if (sActivityLeakReported) return; if (sStrictmodeDetectedActivityLeak != null) { Loading
tests/tapl/com/android/launcher3/tapl/Background.java +18 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,12 @@ public class Background extends LauncherInstrumentation.VisibleContainer { } case THREE_BUTTON: if (mLauncher.isTablet()) { mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN); mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP); } mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, SQUARE_BUTTON_EVENT); mLauncher.runToState( () -> mLauncher.waitForNavigationUiObject("recent_apps").click(), Loading Loading @@ -225,9 +231,21 @@ public class Background extends LauncherInstrumentation.VisibleContainer { case THREE_BUTTON: // Double press the recents button. UiObject2 recentsButton = mLauncher.waitForNavigationUiObject("recent_apps"); if (mLauncher.isTablet()) { mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN); mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP); } mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, SQUARE_BUTTON_EVENT); mLauncher.runToState(() -> recentsButton.click(), OVERVIEW_STATE_ORDINAL); mLauncher.getOverview(); if (mLauncher.isTablet()) { mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_DOWN); mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, LauncherInstrumentation.EVENT_TOUCH_UP); } mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN, SQUARE_BUTTON_EVENT); mLauncher.executeAndWaitForEvent( () -> recentsButton.click(), Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +6 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,8 @@ public final class LauncherInstrumentation { private static final int ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME = 20; private static final int GESTURE_STEP_MS = 16; private static final Pattern EVENT_TOUCH_DOWN = getTouchEventPattern("ACTION_DOWN"); private static final Pattern EVENT_TOUCH_UP = getTouchEventPattern("ACTION_UP"); static final Pattern EVENT_TOUCH_DOWN = getTouchEventPattern("ACTION_DOWN"); static final Pattern EVENT_TOUCH_UP = getTouchEventPattern("ACTION_UP"); private static final Pattern EVENT_TOUCH_CANCEL = getTouchEventPattern("ACTION_CANCEL"); private static final Pattern EVENT_PILFER_POINTERS = Pattern.compile("pilferPointers"); static final Pattern EVENT_START = Pattern.compile("start:"); Loading Loading @@ -750,6 +750,10 @@ public final class LauncherInstrumentation { expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS); expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_UP_TIS); } if (isTablet()) { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN); expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_UP); } runToState( waitForNavigationUiObject("home")::click, Loading