(ok: boolean)
| 1282 | let done = false; |
| 1283 | const tWait = Date.now(); |
| 1284 | const finish = (ok: boolean) => { |
| 1285 | if (done) return; |
| 1286 | done = true; |
| 1287 | try { |
| 1288 | a.off(a.activityStartedEvent || 'activityStarted', onAny); |
| 1289 | a.off(a.activityResumedEvent || 'activityResumed', onAny); |
| 1290 | } catch {} |
| 1291 | if (VERBOSE) |
| 1292 | console.log('[hmr-client] [android] readiness result', { |
| 1293 | ok, |
| 1294 | elapsedMs: Date.now() - tWait, |
| 1295 | }); |
| 1296 | resolve(ok); |
| 1297 | }; |
| 1298 | const onAny = (evt?: any) => { |
| 1299 | if (VERBOSE) |
| 1300 | console.log('[hmr-client] [android] activity event', { |
no test coverage detected