summaryrefslogtreecommitdiffstats
path: root/cmds/am
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2015-02-11 14:35:47 -0800
committerWale Ogunwale <ogunwale@google.com>2015-02-12 09:25:52 -0800
commit5e789f03b2bd018ab44cb4d1018f3682f27fd510 (patch)
tree01125dbd44550fd395b71960f1e3129f9a316c4c /cmds/am
parent346066ef90c6b0af50ba0187338de7e8c8c2f8aa (diff)
downloadframeworks_base-5e789f03b2bd018ab44cb4d1018f3682f27fd510.zip
frameworks_base-5e789f03b2bd018ab44cb4d1018f3682f27fd510.tar.gz
frameworks_base-5e789f03b2bd018ab44cb4d1018f3682f27fd510.tar.bz2
Fixed bug in 'am stack split' command.
Change-Id: Id3efb65a3f9cbf3c223ea08d51e2028180bd5479
Diffstat (limited to 'cmds/am')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 8997671..62081ee 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -1823,16 +1823,18 @@ public class Am extends BaseCommand {
showError("Error: Unable to create new stack...");
}
- final StackInfo newStackInfo = mAm.getStackInfo(container.getStackId());
+ final int newStackId = container.getStackId();
if (intent != null) {
container.startActivity(intent);
} else if (currentStackInfo.taskIds != null && currentStackInfo.taskIds.length > 1) {
// Move top task over to new stack
mAm.moveTaskToStack(currentStackInfo.taskIds[currentStackInfo.taskIds.length - 1],
- newStackInfo.stackId, true);
+ newStackId, true);
}
+ final StackInfo newStackInfo = mAm.getStackInfo(newStackId);
+
// Make all tasks in the stacks resizeable.
for (int taskId : currentStackInfo.taskIds) {
mAm.setTaskResizeable(taskId, true);