(
session: SessionState,
appBundleId: string,
options: { requireNoBlockingDialog?: boolean } = {},
)
| 318 | } |
| 319 | |
| 320 | async function waitForAndroidAppFocus( |
| 321 | session: SessionState, |
| 322 | appBundleId: string, |
| 323 | options: { requireNoBlockingDialog?: boolean } = {}, |
| 324 | ): Promise<boolean> { |
| 325 | for (let attempt = 0; attempt < ANDROID_MODAL_POLL_ATTEMPTS; attempt += 1) { |
| 326 | if (await isAndroidAppFocused(session, appBundleId, options)) { |
| 327 | return true; |
| 328 | } |
| 329 | await sleep(ANDROID_MODAL_POLL_MS); |
| 330 | } |
| 331 | return await isAndroidAppFocused(session, appBundleId, options); |
| 332 | } |
| 333 | |
| 334 | async function isAndroidAppFocused( |
| 335 | session: SessionState, |
no test coverage detected