diff options
author | Wale Ogunwale <ogunwale@google.com> | 2016-02-12 12:56:32 -0800 |
---|---|---|
committer | Wale Ogunwale <ogunwale@google.com> | 2016-02-16 10:09:51 -0800 |
commit | 06e8ee0c8ad2527add3db3dd1a1d4eee9d8631f8 (patch) | |
tree | 05b9a9a33e9104a956d4f29a31aa7c6de8c89673 /cmds/am | |
parent | 5658e4b94de91e938459e50d0f5e6ef837ffb4ac (diff) |
Added AM API to remove a stack
Use the new API when closing Pip.
Bug: 26982752
Change-Id: I074d23b5535a4534626183ab77142d3932a803f0
Diffstat (limited to 'cmds/am')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 12 |
1 files changed, 12 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 6206323a89f5..eedb82bd5d0a 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -167,6 +167,7 @@ public class Am extends BaseCommand { " am stack positiontask <TASK_ID> <STACK_ID> <POSITION>\n" + " am stack list\n" + " am stack info <STACK_ID>\n" + + " am stack remove <STACK_ID>\n" + " am task lock <TASK_ID>\n" + " am task lock stop\n" + " am task resizeable <TASK_ID> [0 (unresizeable) | 1 (crop_windows) | 2 (resizeable) | 3 (resizeable_and_pipable)]\n" + @@ -324,6 +325,8 @@ public class Am extends BaseCommand { "\n" + "am stack info: display the information about activity stack <STACK_ID>.\n" + "\n" + + "am stack remove: remove stack <STACK_ID>.\n" + + "\n" + "am task lock: bring <TASK_ID> to the front and don't allow other tasks to run.\n" + "\n" + "am task lock stop: end the current task lock.\n" + @@ -1732,6 +1735,9 @@ public class Am extends BaseCommand { case "size-docked-stack-test": runStackSizeDockedStackTest(); break; + case "remove": + runStackRemove(); + break; default: showError("Error: unknown command '" + op + "'"); break; @@ -1868,6 +1874,12 @@ public class Am extends BaseCommand { } } + private void runStackRemove() throws Exception { + String stackIdStr = nextArgRequired(); + int stackId = Integer.valueOf(stackIdStr); + mAm.removeStack(stackId); + } + private void runMoveTopActivityToPinnedStack() throws Exception { int stackId = Integer.valueOf(nextArgRequired()); final Rect bounds = getBounds(); |