openuispec 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -272,15 +272,20 @@ export async function installAndLaunch(
|
|
|
272
272
|
// Install (replace existing)
|
|
273
273
|
await adbExec(adb, serial, `install -r "${apkPath}"`);
|
|
274
274
|
|
|
275
|
-
// Force-stop
|
|
275
|
+
// Force-stop and clear saved navigation state
|
|
276
276
|
await adbShell(adb, serial, `am force-stop ${appInfo.applicationId}`);
|
|
277
277
|
|
|
278
|
+
// FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK = 0x10008000
|
|
279
|
+
// Clears saved navigation state so deep links route correctly
|
|
280
|
+
const clearFlags = `-f 0x10008000`;
|
|
281
|
+
|
|
278
282
|
if (route) {
|
|
279
|
-
|
|
280
|
-
|
|
283
|
+
await adbShell(adb, serial,
|
|
284
|
+
`am start -W -a android.intent.action.VIEW -d "${route}" ${clearFlags} ` +
|
|
285
|
+
`${appInfo.applicationId}/${appInfo.launchActivity}`);
|
|
281
286
|
} else {
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
await adbShell(adb, serial,
|
|
288
|
+
`am start -W ${clearFlags} -n ${appInfo.applicationId}/${appInfo.launchActivity}`);
|
|
284
289
|
}
|
|
285
290
|
}
|
|
286
291
|
|