Merge "Added support for static vs. dynamic stacks"
This commit is contained in:
committed by
Android (Google) Code Review
commit
a786bb6b1c
@@ -404,6 +404,42 @@ public class ActivityManager {
|
||||
*/
|
||||
public static final int COMPAT_MODE_TOGGLE = 2;
|
||||
|
||||
/**
|
||||
* First static stack stack ID.
|
||||
* @hide
|
||||
*/
|
||||
public static final int FIRST_STATIC_STACK_ID = 0;
|
||||
|
||||
/**
|
||||
* Home activity stack ID.
|
||||
* @hide
|
||||
*/
|
||||
public static final int HOME_STACK_ID = FIRST_STATIC_STACK_ID;
|
||||
|
||||
/**
|
||||
* ID of stack where fullscreen activities are normally launched into.
|
||||
* @hide
|
||||
*/
|
||||
public static final int FULLSCREEN_WORKSPACE_STACK_ID = 1;
|
||||
|
||||
/**
|
||||
* ID of stack where freeform/resized activities are normally launched into.
|
||||
* @hide
|
||||
*/
|
||||
public static final int FREEFORM_WORKSPACE_STACK_ID = FULLSCREEN_WORKSPACE_STACK_ID + 1;
|
||||
|
||||
/**
|
||||
* Last static stack stack ID.
|
||||
* @hide
|
||||
*/
|
||||
public static final int LAST_STATIC_STACK_ID = FREEFORM_WORKSPACE_STACK_ID;
|
||||
|
||||
/**
|
||||
* Start of ID range used by stacks that are created dynamically.
|
||||
* @hide
|
||||
*/
|
||||
public static final int FIRST_DYNAMIC_STACK_ID = LAST_STATIC_STACK_ID + 1;
|
||||
|
||||
/** @hide */
|
||||
public int getFrontActivityScreenCompatMode() {
|
||||
try {
|
||||
|
||||
@@ -752,6 +752,16 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
|
||||
return true;
|
||||
}
|
||||
|
||||
case POSITION_TASK_IN_STACK_TRANSACTION: {
|
||||
data.enforceInterface(IActivityManager.descriptor);
|
||||
int taskId = data.readInt();
|
||||
int stackId = data.readInt();
|
||||
int position = data.readInt();
|
||||
positionTaskInStack(taskId, stackId, position);
|
||||
reply.writeNoException();
|
||||
return true;
|
||||
}
|
||||
|
||||
case GET_ALL_STACK_INFOS_TRANSACTION: {
|
||||
data.enforceInterface(IActivityManager.descriptor);
|
||||
List<StackInfo> list = getAllStackInfos();
|
||||
@@ -3469,6 +3479,20 @@ class ActivityManagerProxy implements IActivityManager
|
||||
reply.recycle();
|
||||
}
|
||||
@Override
|
||||
public void positionTaskInStack(int taskId, int stackId, int position) throws RemoteException
|
||||
{
|
||||
Parcel data = Parcel.obtain();
|
||||
Parcel reply = Parcel.obtain();
|
||||
data.writeInterfaceToken(IActivityManager.descriptor);
|
||||
data.writeInt(taskId);
|
||||
data.writeInt(stackId);
|
||||
data.writeInt(position);
|
||||
mRemote.transact(POSITION_TASK_IN_STACK_TRANSACTION, data, reply, 0);
|
||||
reply.readException();
|
||||
data.recycle();
|
||||
reply.recycle();
|
||||
}
|
||||
@Override
|
||||
public List<StackInfo> getAllStackInfos() throws RemoteException
|
||||
{
|
||||
Parcel data = Parcel.obtain();
|
||||
|
||||
@@ -139,6 +139,7 @@ public interface IActivityManager extends IInterface {
|
||||
public void moveTaskBackwards(int task) throws RemoteException;
|
||||
public void moveTaskToStack(int taskId, int stackId, boolean toTop) throws RemoteException;
|
||||
public void resizeStack(int stackId, Rect bounds) throws RemoteException;
|
||||
public void positionTaskInStack(int taskId, int stackId, int position) throws RemoteException;
|
||||
public List<StackInfo> getAllStackInfos() throws RemoteException;
|
||||
public StackInfo getStackInfo(int stackId) throws RemoteException;
|
||||
public boolean isInHomeStack(int taskId) throws RemoteException;
|
||||
@@ -874,4 +875,5 @@ public interface IActivityManager extends IInterface {
|
||||
// Start of N transactions
|
||||
int START_BINDER_TRACKING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 340;
|
||||
int STOP_BINDER_TRACKING_AND_DUMP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 341;
|
||||
int POSITION_TASK_IN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 342;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user