summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2013-12-19 10:55:17 -0800
committerCraig Mautner <cmautner@google.com>2013-12-19 10:55:17 -0800
commitff288f7f57dfd7f12a6e8c36d9d46331077dbc03 (patch)
tree0a7bb2027da086281f8be712c99dc170b51410b2 /cmds
parented6649f89f236ea9e665028bd33d6d804b906a92 (diff)
parentb7bba718a88e9baa843e51d9871129d8e682c0b0 (diff)
downloadframeworks_base-ff288f7f57dfd7f12a6e8c36d9d46331077dbc03.zip
frameworks_base-ff288f7f57dfd7f12a6e8c36d9d46331077dbc03.tar.gz
frameworks_base-ff288f7f57dfd7f12a6e8c36d9d46331077dbc03.tar.bz2
resolved conflicts for merge of b7bba718 to master
Change-Id: Ibbac3f6e3eda0149ae9446d6baed1d1bee5138ac
Diffstat (limited to 'cmds')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index f3432a0..7adf5ec 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -21,6 +21,7 @@ package com.android.commands.am;
import android.app.ActivityManager;
import android.app.ActivityManager.StackInfo;
import android.app.ActivityManagerNative;
+import android.app.IActivityContainer;
import android.app.IActivityController;
import android.app.IActivityManager;
import android.app.IInstrumentationWatcher;
@@ -35,6 +36,7 @@ import android.graphics.Rect;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
+import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -107,7 +109,7 @@ public class Am extends BaseCommand {
" am to-intent-uri [INTENT]\n" +
" am switch-user <USER_ID>\n" +
" am stop-user <USER_ID>\n" +
- " am stack create <TASK_ID>\n" +
+ " am stack create <TASK_ID> <DISPLAY_ID>\n" +
" am stack movetask <TASK_ID> <STACK_ID> [true|false]\n" +
" am stack resize <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>\n" +
" am stack list\n" +
@@ -1558,10 +1560,16 @@ public class Am extends BaseCommand {
private void runStackCreate() throws Exception {
String taskIdStr = nextArgRequired();
int taskId = Integer.valueOf(taskIdStr);
+ String displayIdStr = nextArgRequired();
+ int displayId = Integer.valueOf(displayIdStr);
try {
- int stackId = mAm.createStack(taskId);
- System.out.println("createStack returned new stackId=" + stackId + "\n\n");
+ IBinder homeActivityToken = mAm.getHomeActivityToken();
+ IActivityContainer container = mAm.createActivityContainer(homeActivityToken, null);
+ final int stackId = container.getStackId();
+ System.out.println("createStack returned new stackId=" + stackId + "\n");
+ container.attachToDisplay(displayId);
+ mAm.moveTaskToStack(taskId, stackId, true);
} catch (RemoteException e) {
}
}