Loading tests/multivalentTests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +17 −11 Original line number Diff line number Diff line Loading @@ -2055,11 +2055,14 @@ public final class LauncherInstrumentation { final long downTime = SystemClock.uptimeMillis(); sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetCenter, GestureScope.DONT_EXPECT_PILFER); try { expectEvent(TestProtocol.SEQUENCE_MAIN, longClickEvent); final UiObject2 result = waitForLauncherObject(resName); return result; } finally { sendPointer(downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, targetCenter, GestureScope.DONT_EXPECT_PILFER); return result; } } @NonNull Loading @@ -2070,12 +2073,15 @@ public final class LauncherInstrumentation { sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetCenter, GestureScope.DONT_EXPECT_PILFER, InputDevice.SOURCE_MOUSE, /* isRightClick= */ true); try { expectEvent(TestProtocol.SEQUENCE_MAIN, rightClickEvent); final UiObject2 result = waitForLauncherObject(resName); return result; } finally { sendPointer(downTime, SystemClock.uptimeMillis(), ACTION_UP, targetCenter, GestureScope.DONT_EXPECT_PILFER, InputDevice.SOURCE_MOUSE, /* isRightClick= */ true); return result; } } private static int getSystemIntegerRes(Context context, String resName) { Loading tests/multivalentTests/tapl/com/android/launcher3/tapl/WidgetResizeFrame.java +9 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.tapl; import static com.android.launcher3.tapl.Launchable.DEFAULT_DRAG_STEPS; import static org.junit.Assert.assertTrue; import android.graphics.Point; Loading Loading @@ -61,11 +62,14 @@ public class WidgetResizeFrame { final long downTime = SystemClock.uptimeMillis(); mLauncher.sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetStart, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER); try { mLauncher.movePointer(targetStart, targetDest, DEFAULT_DRAG_STEPS, true, downTime, downTime, true, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER); } finally { mLauncher.sendPointer(downTime, downTime, MotionEvent.ACTION_UP, targetDest, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER); } try (LauncherInstrumentation.Closable c2 = mLauncher.addContextLayer( "want to return resized widget resize frame")) { Loading Loading
tests/multivalentTests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +17 −11 Original line number Diff line number Diff line Loading @@ -2055,11 +2055,14 @@ public final class LauncherInstrumentation { final long downTime = SystemClock.uptimeMillis(); sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetCenter, GestureScope.DONT_EXPECT_PILFER); try { expectEvent(TestProtocol.SEQUENCE_MAIN, longClickEvent); final UiObject2 result = waitForLauncherObject(resName); return result; } finally { sendPointer(downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, targetCenter, GestureScope.DONT_EXPECT_PILFER); return result; } } @NonNull Loading @@ -2070,12 +2073,15 @@ public final class LauncherInstrumentation { sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetCenter, GestureScope.DONT_EXPECT_PILFER, InputDevice.SOURCE_MOUSE, /* isRightClick= */ true); try { expectEvent(TestProtocol.SEQUENCE_MAIN, rightClickEvent); final UiObject2 result = waitForLauncherObject(resName); return result; } finally { sendPointer(downTime, SystemClock.uptimeMillis(), ACTION_UP, targetCenter, GestureScope.DONT_EXPECT_PILFER, InputDevice.SOURCE_MOUSE, /* isRightClick= */ true); return result; } } private static int getSystemIntegerRes(Context context, String resName) { Loading
tests/multivalentTests/tapl/com/android/launcher3/tapl/WidgetResizeFrame.java +9 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.tapl; import static com.android.launcher3.tapl.Launchable.DEFAULT_DRAG_STEPS; import static org.junit.Assert.assertTrue; import android.graphics.Point; Loading Loading @@ -61,11 +62,14 @@ public class WidgetResizeFrame { final long downTime = SystemClock.uptimeMillis(); mLauncher.sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetStart, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER); try { mLauncher.movePointer(targetStart, targetDest, DEFAULT_DRAG_STEPS, true, downTime, downTime, true, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER); } finally { mLauncher.sendPointer(downTime, downTime, MotionEvent.ACTION_UP, targetDest, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER); } try (LauncherInstrumentation.Closable c2 = mLauncher.addContextLayer( "want to return resized widget resize frame")) { Loading