diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-11-09 14:36:29 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-09 14:36:29 +0000 |
commit | 3b2681bad989013154f90c4b9c31f074af1f822c (patch) | |
tree | 40a2726dab8f28ca010425a7f8563775fa75eb07 /cmds | |
parent | 3a77503ca16253a702977a11406aec7a332837cb (diff) | |
parent | 3af8b88d032011fdbc6c498cf3f3881281cff999 (diff) | |
download | frameworks_base-3b2681bad989013154f90c4b9c31f074af1f822c.zip frameworks_base-3b2681bad989013154f90c4b9c31f074af1f822c.tar.gz frameworks_base-3b2681bad989013154f90c4b9c31f074af1f822c.tar.bz2 |
am 3af8b88d: Merge "Add drop box reports of low memory." into ics-mr1
* commit '3af8b88d032011fdbc6c498cf3f3881281cff999':
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" + |