( device: DeviceInfo, )
| 286 | } |
| 287 | |
| 288 | export async function getAndroidScreenSize( |
| 289 | device: DeviceInfo, |
| 290 | ): Promise<{ width: number; height: number }> { |
| 291 | const result = await runAndroidAdb(device, ['shell', 'wm', 'size']); |
| 292 | const match = result.stdout.match(/Physical size:\s*(\d+)x(\d+)/); |
| 293 | if (!match) throw new AppError('COMMAND_FAILED', 'Unable to read screen size'); |
| 294 | return { width: Number(match[1]), height: Number(match[2]) }; |
| 295 | } |
| 296 | |
| 297 | const ANDROID_INPUT_TEXT_CHUNK_SIZE = 8; |
| 298 |
no test coverage detected