(device: DeviceInfo)
| 206 | } |
| 207 | |
| 208 | export async function getAndroidAppState(device: DeviceInfo): Promise<AndroidForegroundApp> { |
| 209 | const windowFocus = await readAndroidFocus(device, [ |
| 210 | ['shell', 'dumpsys', 'window', 'windows'], |
| 211 | ['shell', 'dumpsys', 'window'], |
| 212 | ]); |
| 213 | if (windowFocus) return windowFocus; |
| 214 | |
| 215 | const activityFocus = await readAndroidFocus(device, [ |
| 216 | ['shell', 'dumpsys', 'activity', 'activities'], |
| 217 | ['shell', 'dumpsys', 'activity'], |
| 218 | ]); |
| 219 | if (activityFocus) return activityFocus; |
| 220 | return {}; |
| 221 | } |
| 222 | |
| 223 | export async function getAndroidBlockingDialogFocus( |
| 224 | device: DeviceInfo, |
no test coverage detected