Skip to content

Commit fea7623

Browse files
authored
fix: keep resume behavior as activateApp (#746)
* fix: follow monkey behavior * revert, but do not set -f for now * set only FLAG_ACTIVITY_NEW_TASK by following monkey * set 102 * update appium adb * keep monkey
1 parent b702157 commit fea7623

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/commands/app-management.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ commands.activateApp = async function activateApp (appId) {
8181
'am', (apiLevel < 26) ? 'start' : 'start-activity',
8282
'-a', 'android.intent.action.MAIN',
8383
'-c', 'android.intent.category.LAUNCHER',
84-
// FLAG_ACTIVITY_REORDER_TO_FRONT | FLAG_ACTIVITY_BROUGHT_TO_FRONT | FLAG_ACTIVITY_NEW_TASK
85-
'-f', '0x10420000',
84+
// FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
85+
// https://developer.android.com/reference/android/content/Intent#FLAG_ACTIVITY_NEW_TASK
86+
// https://developer.android.com/reference/android/content/Intent#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
87+
'-f', '0x10200000',
8688
'-n', await this.adb.resolveLaunchableActivity(appId),
8789
]);
8890
this.log.debug(stdout);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@appium/base-driver": "^8.5.2",
3939
"@appium/support": "^2.58.0",
4040
"@babel/runtime": "^7.0.0",
41-
"appium-adb": "^9.5.0",
41+
"appium-adb": "^9.6.0",
4242
"appium-chromedriver": "^5.0.1",
4343
"asyncbox": "^2.8.0",
4444
"axios": "^0.x",

0 commit comments

Comments
 (0)