( device: DeviceInfo, app: string, appPath: string, )
| 894 | } |
| 895 | |
| 896 | export async function reinstallAndroidApp( |
| 897 | device: DeviceInfo, |
| 898 | app: string, |
| 899 | appPath: string, |
| 900 | ): Promise<{ package: string }> { |
| 901 | return await androidAppResolutionCache.invalidateWhile( |
| 902 | androidAppResolutionScope(device), |
| 903 | async () => { |
| 904 | if (!device.booted) { |
| 905 | await waitForAndroidBoot(device.id); |
| 906 | } |
| 907 | const { package: pkg } = await uninstallAndroidApp(device, app); |
| 908 | const prepared = await prepareAndroidInstallArtifact( |
| 909 | { kind: 'path', path: appPath }, |
| 910 | { resolveIdentity: false }, |
| 911 | ); |
| 912 | try { |
| 913 | await installAndroidInstallablePath(device, prepared.installablePath); |
| 914 | } finally { |
| 915 | await prepared.cleanup(); |
| 916 | } |
| 917 | return { package: pkg }; |
| 918 | }, |
| 919 | ); |
| 920 | } |
no test coverage detected