summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorJason Simmons <jsimmons@google.com>2011-11-09 10:08:21 -0800
committerJason Simmons <jsimmons@google.com>2011-11-09 10:08:21 -0800
commitf98168677929fe9e004d12645a5850551072395a (patch)
tree793cdacc3ff59c7727c184b2620bd8c71bd2074c /cmds
parentd8883f512924cf45f564414be4033d12d18a1aa6 (diff)
parent3af8b88d032011fdbc6c498cf3f3881281cff999 (diff)
downloadframeworks_base-f98168677929fe9e004d12645a5850551072395a.zip
frameworks_base-f98168677929fe9e004d12645a5850551072395a.tar.gz
frameworks_base-f98168677929fe9e004d12645a5850551072395a.tar.bz2
resolved conflicts for merge of 3af8b88d to ics-aah
Change-Id: I2b68cd7c904e68a16565b7274560e7105c643c87
Diffstat (limited to 'cmds')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index d8b2286..040a994 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -112,6 +112,10 @@ public class Am {
runForceStop();
} else if (op.equals("clear-data")) {
runClearData();
+ } else if (op.equals("kill")) {
+ runKill();
+ } else if (op.equals("kill-all")) {
+ runKillAll();
} else if (op.equals("instrument")) {
runInstrument();
} else if (op.equals("broadcast")) {
@@ -502,6 +506,14 @@ public class Am {
mAm.forceStopPackage(nextArgRequired());
}
+ private void runKill() throws Exception {
+ mAm.killBackgroundProcesses(nextArgRequired());
+ }
+
+ private void runKillAll() throws Exception {
+ mAm.killAllBackgroundProcesses();
+ }
+
class ClearUserDataObserver extends IPackageDataObserver.Stub {
public int status = -1;
@@ -1223,6 +1235,8 @@ public class Am {
" am startservice <INTENT>\n" +
" am force-stop <PACKAGE>\n" +
" am clear-data <PACKAGE>\n" +
+ " am kill <PACKAGE>\n" +
+ " am kill-all\n" +
" am broadcast <INTENT>\n" +
" am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]\n" +
" [--no-window-animation] <COMPONENT>\n" +
@@ -1246,6 +1260,12 @@ public class Am {
"\n" +
"am force-stop: force stop everything associated with <PACKAGE>.\n" +
"\n" +
+ "am kill: Kill all processes associated with <PACKAGE>. Only kills.\n" +
+ " processes that are safe to kill -- that is, will not impact the user\n" +
+ " experience.\n" +
+ "\n" +
+ "am kill-all: Kill all background processes.\n" +
+ "\n" +
"am clear-data: clear the user data associated with <PACKAGE>.\n" +
"\n" +
"am broadcast: send a broadcast Intent.\n" +