Loading quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { mDeviceProfile.overviewPageSpacing); return response; } case TestProtocol.REQUEST_HAS_TIS: { response.putBoolean( TestProtocol.REQUEST_HAS_TIS, true); return response; } } return super.call(method, arg, extras); Loading src/com/android/launcher3/testing/TestInformationHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,12 @@ public class TestInformationHandler implements ResourceBasedOverride { return new Point(cellRect.centerX(), cellRect.centerY()); }); case TestProtocol.REQUEST_HAS_TIS: { response.putBoolean( TestProtocol.REQUEST_HAS_TIS, false); return response; } default: return null; } Loading src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public final class TestProtocol { public static final String REQUEST_GET_ACTIVITIES_CREATED_COUNT = "get-activities-created-count"; public static final String REQUEST_GET_ACTIVITIES = "get-activities"; public static final String REQUEST_HAS_TIS = "has-touch-interaction-service"; public static final String REQUEST_WORKSPACE_CELL_LAYOUT_SIZE = "workspace-cell-layout-size"; public static final String REQUEST_WORKSPACE_CELL_CENTER = "workspace-cell-center"; Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +9 −4 Original line number Diff line number Diff line Loading @@ -1499,9 +1499,14 @@ public final class LauncherInstrumentation { 0, 0, 1.0f, 1.0f, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0); } private boolean hasTIS() { return getTestInfo(TestProtocol.REQUEST_HAS_TIS).getBoolean(TestProtocol.REQUEST_HAS_TIS); } public void sendPointer(long downTime, long currentTime, int action, Point point, GestureScope gestureScope) { final boolean notLauncher3 = !isLauncher3(); final boolean hasTIS = hasTIS(); switch (action) { case MotionEvent.ACTION_DOWN: if (gestureScope != GestureScope.OUTSIDE_WITH_PILFER Loading @@ -1509,12 +1514,12 @@ public final class LauncherInstrumentation { && gestureScope != GestureScope.OUTSIDE_WITH_KEYCODE) { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN); } if (notLauncher3 && getNavigationModel() != NavigationModel.THREE_BUTTON) { if (hasTIS && getNavigationModel() != NavigationModel.THREE_BUTTON) { expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS); } break; case MotionEvent.ACTION_UP: if (notLauncher3 && gestureScope != GestureScope.INSIDE if (hasTIS && gestureScope != GestureScope.INSIDE && gestureScope != GestureScope.INSIDE_TO_OUTSIDE_WITHOUT_PILFER && (gestureScope == GestureScope.OUTSIDE_WITH_PILFER || gestureScope == GestureScope.INSIDE_TO_OUTSIDE)) { Loading @@ -1528,7 +1533,7 @@ public final class LauncherInstrumentation { || gestureScope == GestureScope.OUTSIDE_WITHOUT_PILFER ? EVENT_TOUCH_UP : EVENT_TOUCH_CANCEL); } if (notLauncher3 && getNavigationModel() != NavigationModel.THREE_BUTTON) { if (hasTIS && getNavigationModel() != NavigationModel.THREE_BUTTON) { expectEvent(TestProtocol.SEQUENCE_TIS, gestureScope == GestureScope.INSIDE_TO_OUTSIDE_WITH_KEYCODE || gestureScope == GestureScope.OUTSIDE_WITH_KEYCODE Loading Loading
quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { mDeviceProfile.overviewPageSpacing); return response; } case TestProtocol.REQUEST_HAS_TIS: { response.putBoolean( TestProtocol.REQUEST_HAS_TIS, true); return response; } } return super.call(method, arg, extras); Loading
src/com/android/launcher3/testing/TestInformationHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,12 @@ public class TestInformationHandler implements ResourceBasedOverride { return new Point(cellRect.centerX(), cellRect.centerY()); }); case TestProtocol.REQUEST_HAS_TIS: { response.putBoolean( TestProtocol.REQUEST_HAS_TIS, false); return response; } default: return null; } Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public final class TestProtocol { public static final String REQUEST_GET_ACTIVITIES_CREATED_COUNT = "get-activities-created-count"; public static final String REQUEST_GET_ACTIVITIES = "get-activities"; public static final String REQUEST_HAS_TIS = "has-touch-interaction-service"; public static final String REQUEST_WORKSPACE_CELL_LAYOUT_SIZE = "workspace-cell-layout-size"; public static final String REQUEST_WORKSPACE_CELL_CENTER = "workspace-cell-center"; Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +9 −4 Original line number Diff line number Diff line Loading @@ -1499,9 +1499,14 @@ public final class LauncherInstrumentation { 0, 0, 1.0f, 1.0f, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0); } private boolean hasTIS() { return getTestInfo(TestProtocol.REQUEST_HAS_TIS).getBoolean(TestProtocol.REQUEST_HAS_TIS); } public void sendPointer(long downTime, long currentTime, int action, Point point, GestureScope gestureScope) { final boolean notLauncher3 = !isLauncher3(); final boolean hasTIS = hasTIS(); switch (action) { case MotionEvent.ACTION_DOWN: if (gestureScope != GestureScope.OUTSIDE_WITH_PILFER Loading @@ -1509,12 +1514,12 @@ public final class LauncherInstrumentation { && gestureScope != GestureScope.OUTSIDE_WITH_KEYCODE) { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN); } if (notLauncher3 && getNavigationModel() != NavigationModel.THREE_BUTTON) { if (hasTIS && getNavigationModel() != NavigationModel.THREE_BUTTON) { expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS); } break; case MotionEvent.ACTION_UP: if (notLauncher3 && gestureScope != GestureScope.INSIDE if (hasTIS && gestureScope != GestureScope.INSIDE && gestureScope != GestureScope.INSIDE_TO_OUTSIDE_WITHOUT_PILFER && (gestureScope == GestureScope.OUTSIDE_WITH_PILFER || gestureScope == GestureScope.INSIDE_TO_OUTSIDE)) { Loading @@ -1528,7 +1533,7 @@ public final class LauncherInstrumentation { || gestureScope == GestureScope.OUTSIDE_WITHOUT_PILFER ? EVENT_TOUCH_UP : EVENT_TOUCH_CANCEL); } if (notLauncher3 && getNavigationModel() != NavigationModel.THREE_BUTTON) { if (hasTIS && getNavigationModel() != NavigationModel.THREE_BUTTON) { expectEvent(TestProtocol.SEQUENCE_TIS, gestureScope == GestureScope.INSIDE_TO_OUTSIDE_WITH_KEYCODE || gestureScope == GestureScope.OUTSIDE_WITH_KEYCODE Loading