Loading core/java/android/app/ActivityManagerNative.java +22 −0 Original line number Diff line number Diff line Loading @@ -752,6 +752,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case MOVE_STACK_TO_DISPLAY_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int stackId = data.readInt(); int displayId = data.readInt(); moveStackToDisplay(stackId, displayId); reply.writeNoException(); return true; } case MOVE_TASK_TO_FRONT_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int task = data.readInt(); Loading Loading @@ -3885,6 +3894,19 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); return list; } public void moveStackToDisplay(int stackId, int displayId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(stackId); data.writeInt(displayId); mRemote.transact(MOVE_STACK_TO_DISPLAY_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); } @Override public void moveTaskToFront(int task, int flags, Bundle options) throws RemoteException { Parcel data = Parcel.obtain(); Loading core/java/android/app/ActivityView.java +0 −7 Original line number Diff line number Diff line Loading @@ -448,13 +448,6 @@ public class ActivityView extends ViewGroup { mGuard.open("release"); } void attachToDisplay(int displayId) { try { mIActivityContainer.attachToDisplay(displayId); } catch (RemoteException e) { } } void setSurface(Surface surface, int width, int height, int density) throws RemoteException { mIActivityContainer.setSurface(surface, width, height, density); Loading core/java/android/app/IActivityContainer.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import android.view.Surface; /** @hide */ interface IActivityContainer { void attachToDisplay(int displayId); void addToDisplay(int displayId); void setSurface(in Surface surface, int width, int height, int density); int startActivity(in Intent intent); int startActivityIntentSender(in IIntentSender intentSender); Loading core/java/android/app/IActivityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ public interface IActivityManager extends IInterface { public List<RunningServiceInfo> getServices(int maxNum, int flags) throws RemoteException; public List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState() throws RemoteException; public void moveStackToDisplay(int stackId, int displayId) throws RemoteException; public void moveTaskToFront(int task, int flags, Bundle options) throws RemoteException; public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) throws RemoteException; public void moveTaskBackwards(int task) throws RemoteException; Loading Loading @@ -1100,4 +1101,5 @@ public interface IActivityManager extends IInterface { int REQUEST_ACTIVITY_RELAUNCH = IBinder.FIRST_CALL_TRANSACTION+400; int UPDATE_DISPLAY_OVERRIDE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 401; int UNREGISTER_TASK_STACK_LISTENER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+402; int MOVE_STACK_TO_DISPLAY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 403; } services/core/java/com/android/server/am/ActivityManagerService.java +16 −0 Original line number Diff line number Diff line Loading @@ -9512,6 +9512,22 @@ public class ActivityManagerService extends ActivityManagerNative } } @Override public void moveStackToDisplay(int stackId, int displayId) { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveStackToDisplay()"); synchronized (this) { final long ident = Binder.clearCallingIdentity(); try { if (DEBUG_STACK) Slog.d(TAG_STACK, "moveStackToDisplay: moving stackId=" + stackId + " to displayId=" + displayId); mStackSupervisor.moveStackToDisplayLocked(stackId, displayId); } finally { Binder.restoreCallingIdentity(ident); } } } @Override public boolean removeTask(int taskId) { enforceCallingPermission(android.Manifest.permission.REMOVE_TASKS, "removeTask()"); Loading Loading
core/java/android/app/ActivityManagerNative.java +22 −0 Original line number Diff line number Diff line Loading @@ -752,6 +752,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case MOVE_STACK_TO_DISPLAY_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int stackId = data.readInt(); int displayId = data.readInt(); moveStackToDisplay(stackId, displayId); reply.writeNoException(); return true; } case MOVE_TASK_TO_FRONT_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int task = data.readInt(); Loading Loading @@ -3885,6 +3894,19 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); return list; } public void moveStackToDisplay(int stackId, int displayId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(stackId); data.writeInt(displayId); mRemote.transact(MOVE_STACK_TO_DISPLAY_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); } @Override public void moveTaskToFront(int task, int flags, Bundle options) throws RemoteException { Parcel data = Parcel.obtain(); Loading
core/java/android/app/ActivityView.java +0 −7 Original line number Diff line number Diff line Loading @@ -448,13 +448,6 @@ public class ActivityView extends ViewGroup { mGuard.open("release"); } void attachToDisplay(int displayId) { try { mIActivityContainer.attachToDisplay(displayId); } catch (RemoteException e) { } } void setSurface(Surface surface, int width, int height, int density) throws RemoteException { mIActivityContainer.setSurface(surface, width, height, density); Loading
core/java/android/app/IActivityContainer.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import android.view.Surface; /** @hide */ interface IActivityContainer { void attachToDisplay(int displayId); void addToDisplay(int displayId); void setSurface(in Surface surface, int width, int height, int density); int startActivity(in Intent intent); int startActivityIntentSender(in IIntentSender intentSender); Loading
core/java/android/app/IActivityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ public interface IActivityManager extends IInterface { public List<RunningServiceInfo> getServices(int maxNum, int flags) throws RemoteException; public List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState() throws RemoteException; public void moveStackToDisplay(int stackId, int displayId) throws RemoteException; public void moveTaskToFront(int task, int flags, Bundle options) throws RemoteException; public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) throws RemoteException; public void moveTaskBackwards(int task) throws RemoteException; Loading Loading @@ -1100,4 +1101,5 @@ public interface IActivityManager extends IInterface { int REQUEST_ACTIVITY_RELAUNCH = IBinder.FIRST_CALL_TRANSACTION+400; int UPDATE_DISPLAY_OVERRIDE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 401; int UNREGISTER_TASK_STACK_LISTENER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+402; int MOVE_STACK_TO_DISPLAY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 403; }
services/core/java/com/android/server/am/ActivityManagerService.java +16 −0 Original line number Diff line number Diff line Loading @@ -9512,6 +9512,22 @@ public class ActivityManagerService extends ActivityManagerNative } } @Override public void moveStackToDisplay(int stackId, int displayId) { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveStackToDisplay()"); synchronized (this) { final long ident = Binder.clearCallingIdentity(); try { if (DEBUG_STACK) Slog.d(TAG_STACK, "moveStackToDisplay: moving stackId=" + stackId + " to displayId=" + displayId); mStackSupervisor.moveStackToDisplayLocked(stackId, displayId); } finally { Binder.restoreCallingIdentity(ident); } } } @Override public boolean removeTask(int taskId) { enforceCallingPermission(android.Manifest.permission.REMOVE_TASKS, "removeTask()"); Loading