( device: DeviceInfo, packageName: string, )
| 541 | } |
| 542 | |
| 543 | async function isAndroidPackageInstalled( |
| 544 | device: DeviceInfo, |
| 545 | packageName: string, |
| 546 | ): Promise<boolean> { |
| 547 | const result = await runAndroidAdb(device, ['shell', 'pm', 'path', packageName], { |
| 548 | allowFailure: true, |
| 549 | }); |
| 550 | const output = `${result.stdout}\n${result.stderr}`; |
| 551 | if (result.exitCode === 0 && /\bpackage:/i.test(output)) { |
| 552 | return true; |
| 553 | } |
| 554 | if (looksLikeMissingAndroidPackageOutput(output)) { |
| 555 | return false; |
| 556 | } |
| 557 | return false; |
| 558 | } |
| 559 | |
| 560 | async function maybeRethrowAndroidMissingPackageError( |
| 561 | device: DeviceInfo, |
no test coverage detected
searching dependent graphs…