summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Wang <wvw@google.com> 2025-01-15 21:58:47 -0800
committer Wei Wang <wvw@google.com> 2025-01-15 21:58:47 -0800
commitfc5c04c349bea728e6873f5b031dfbc8d61a619e (patch)
treeaffbf0e6c7bb5416d2c78437d69dea69a0465efa
parent177b4e451fb05b2c38f41bc88dfc4ae2b94e274e (diff)
am: set to top-app process group only for instrument
Bug: 379892006 Bug: 383813628 Change-Id: I6cf725f659cb1936c40665e72e5f739dea66de0e Test: Build Flag: NONE for a script change
-rwxr-xr-xcmds/am/am.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds/am/am.sh b/cmds/am/am.sh
index 76ec214cb446..f099be3e26a2 100755
--- a/cmds/am/am.sh
+++ b/cmds/am/am.sh
@@ -1,11 +1,10 @@
#!/system/bin/sh
-# set to top-app process group
-settaskprofile $$ SCHED_SP_TOP_APP >/dev/null 2>&1 || true
-
if [ "$1" != "instrument" ] ; then
cmd activity "$@"
else
+ # set to top-app process group for instrument
+ settaskprofile $$ SCHED_SP_TOP_APP >/dev/null 2>&1 || true
base=/system
export CLASSPATH=$base/framework/am.jar
exec app_process $base/bin com.android.commands.am.Am "$@"