diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-11-09 21:51:21 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-09 21:51:21 +0000 |
commit | 6238667682aba89cba7916fea49328ae4f1e648d (patch) | |
tree | 433e359512a931ffbe3e1e4738369e100b24a597 /cmds | |
parent | 35d17ec7c10be8db87dccd0a9e70b2de6b45b494 (diff) | |
parent | 3b2681bad989013154f90c4b9c31f074af1f822c (diff) | |
download | frameworks_base-6238667682aba89cba7916fea49328ae4f1e648d.zip frameworks_base-6238667682aba89cba7916fea49328ae4f1e648d.tar.gz frameworks_base-6238667682aba89cba7916fea49328ae4f1e648d.tar.bz2 |
am 3b2681ba: am 3af8b88d: Merge "Add drop box reports of low memory." into ics-mr1
* commit '3b2681bad989013154f90c4b9c31f074af1f822c':
Add drop box reports of low memory.
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 20 |
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 4f72289..7c03a2f 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -109,6 +109,10 @@ public class Am { runStartService(); } else if (op.equals("force-stop")) { runForceStop(); + } else if (op.equals("kill")) { + runKill(); + } else if (op.equals("kill-all")) { + runKillAll(); } else if (op.equals("instrument")) { runInstrument(); } else if (op.equals("broadcast")) { @@ -484,6 +488,14 @@ public class Am { mAm.forceStopPackage(nextArgRequired()); } + private void runKill() throws Exception { + mAm.killBackgroundProcesses(nextArgRequired()); + } + + private void runKillAll() throws Exception { + mAm.killAllBackgroundProcesses(); + } + private void sendBroadcast() throws Exception { Intent intent = makeIntent(); IntentReceiver receiver = new IntentReceiver(); @@ -1179,6 +1191,8 @@ public class Am { " [--R COUNT] [-S] <INTENT>\n" + " am startservice <INTENT>\n" + " am force-stop <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" + @@ -1202,6 +1216,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 broadcast: send a broadcast Intent.\n" + "\n" + "am instrument: start an Instrumentation. Typically this target <COMPONENT>\n" + |