( device: DeviceInfo, options: AndroidSwipeGestureOptions, )
| 116 | }; |
| 117 | |
| 118 | export async function swipeGestureAndroid( |
| 119 | device: DeviceInfo, |
| 120 | options: AndroidSwipeGestureOptions, |
| 121 | ): Promise<Record<string, unknown> | void> { |
| 122 | const providerResult = await runAndroidTouchProviderGesture(device, { |
| 123 | kind: 'swipe', |
| 124 | ...options, |
| 125 | }); |
| 126 | if (providerResult) return providerResult; |
| 127 | |
| 128 | try { |
| 129 | return await runAndroidMultiTouchHelperGestureForDevice(device, { kind: 'swipe', ...options }); |
| 130 | } catch (error) { |
| 131 | emitDiagnostic({ |
| 132 | level: 'warn', |
| 133 | phase: 'android_swipe_helper_fallback', |
| 134 | data: { |
| 135 | error: normalizeError(error).message, |
| 136 | }, |
| 137 | }); |
| 138 | await swipeAndroid(device, options.x1, options.y1, options.x2, options.y2, options.durationMs); |
| 139 | return { backend: 'adb-input-swipe-fallback' }; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | export async function pinchAndroid( |
| 144 | device: DeviceInfo, |
no test coverage detected