diff options
author | Craig Mautner <cmautner@google.com> | 2013-12-04 16:14:06 -0800 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2013-12-18 15:08:15 -0800 |
commit | 4a1cb22056112f7ffd5f4fad8b7a092b96e7cc7b (patch) | |
tree | 2a30eb0760369a59905895e88f8325fbf9934414 /cmds | |
parent | 3bcdbd6b2d96427d7cee835e9ed79aeed51de267 (diff) | |
download | frameworks_base-4a1cb22056112f7ffd5f4fad8b7a092b96e7cc7b.zip frameworks_base-4a1cb22056112f7ffd5f4fad8b7a092b96e7cc7b.tar.gz frameworks_base-4a1cb22056112f7ffd5f4fad8b7a092b96e7cc7b.tar.bz2 |
Pair ActivityStacks with Displays
- Introduce concept of ActivityStacks residing on Displays and able
to be decoupled and moved around.
- Add a new interface, IActivityContainer for clients to handle
ActivityStacks.
- Abandon ordering of stacks based on mStackState and instead use
ActivityDisplayInfo.stacks<ActivityStack> ordering.
Progress towards closing bug 12078972.
Change-Id: I7785b61c26dc17f432a4803eebee07c7415fcc1f
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 14 |
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) { } } |