Loading core/java/android/app/ActivityManagerNative.java +5 −5 Original line number Diff line number Diff line Loading @@ -2718,10 +2718,10 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM reply.writeNoException(); return true; } case REMOVE_STACK_TRANSACTION: { case MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); final int stackId = data.readInt(); removeStack(stackId); moveTasksToFullscreenStack(stackId); reply.writeNoException(); return true; } Loading Loading @@ -6358,12 +6358,12 @@ class ActivityManagerProxy implements IActivityManager } @Override public void removeStack(int stackId) throws RemoteException { public void moveTasksToFullscreenStack(int fromStackId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(stackId); mRemote.transact(REMOVE_STACK_TRANSACTION, data, reply, 0); data.writeInt(fromStackId); mRemote.transact(MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); Loading core/java/android/app/IActivityManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ public interface IActivityManager extends IInterface { public void suppressResizeConfigChanges(boolean suppress) throws RemoteException; public void removeStack(int stackId) throws RemoteException; public void moveTasksToFullscreenStack(int fromStackId) throws RemoteException; public int getAppStartMode(int uid, String packageName) throws RemoteException; Loading Loading @@ -906,7 +906,7 @@ public interface IActivityManager extends IInterface { int REPORT_SIZE_CONFIGURATIONS = IBinder.FIRST_CALL_TRANSACTION + 345; int MOVE_TASK_TO_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 346; int SUPPRESS_RESIZE_CONFIG_CHANGES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 347; int REMOVE_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 348; int MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 348; int MOVE_TOP_ACTIVITY_TO_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 349; int GET_APP_START_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 350; int UNLOCK_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 351; Loading packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class WindowManagerProxy { @Override public void run() { try { ActivityManagerNative.getDefault().removeStack(DOCKED_STACK_ID); ActivityManagerNative.getDefault().moveTasksToFullscreenStack(DOCKED_STACK_ID); } catch (RemoteException e) { Log.w(TAG, "Failed to remove stack: " + e); } Loading services/core/java/com/android/server/am/ActivityManagerService.java +14 −12 Original line number Diff line number Diff line Loading @@ -490,6 +490,8 @@ public final class ActivityManagerService extends ActivityManagerNative // Used to indicate that a task is removed it should also be removed from recents. private static final boolean REMOVE_FROM_RECENTS = true; // Used to indicate that an app transition should be animated. private static final boolean ANIMATE = true; private static native int nativeMigrateToBoost(); private static native int nativeMigrateFromBoost(); Loading Loading @@ -4333,7 +4335,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (task.stack.mStackId != launchStackId) { mStackSupervisor.moveTaskToStackLocked( taskId, launchStackId, ON_TOP, FORCE_FOCUS, "startActivityFromRecents", true /* animate */); ANIMATE); } } Loading Loading @@ -9314,7 +9316,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_STACK) Slog.d(TAG_STACK, "moveActivityToStack: moving r=" + r + " to stackId=" + stackId); mStackSupervisor.moveTaskToStackLocked(r.task.taskId, stackId, ON_TOP, !FORCE_FOCUS, "moveActivityToStack", true /* animate */); "moveActivityToStack", ANIMATE); } finally { Binder.restoreCallingIdentity(ident); } Loading @@ -9335,7 +9337,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToStack: moving task=" + taskId + " to stackId=" + stackId + " toTop=" + toTop); mStackSupervisor.moveTaskToStackLocked(taskId, stackId, toTop, !FORCE_FOCUS, "moveTaskToStack", true /* animate */); "moveTaskToStack", ANIMATE); } finally { Binder.restoreCallingIdentity(ident); } Loading Loading @@ -17779,20 +17781,20 @@ public final class ActivityManagerService extends ActivityManagerNative } @Override public void removeStack(int stackId) { public void moveTasksToFullscreenStack(int fromStackId) { enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS, "detahStack()"); if (stackId == HOME_STACK_ID) { throw new IllegalArgumentException("Removing home stack is not allowed."); "moveTasksToFullscreenStack()"); if (fromStackId == HOME_STACK_ID) { throw new IllegalArgumentException("You can't move tasks from the home stack."); } synchronized (this) { long origId = Binder.clearCallingIdentity(); ActivityStack stack = mStackSupervisor.getStack(stackId); final long origId = Binder.clearCallingIdentity(); final ActivityStack stack = mStackSupervisor.getStack(fromStackId); if (stack != null) { ArrayList<TaskRecord> tasks = stack.getAllTasks(); final ArrayList<TaskRecord> tasks = stack.getAllTasks(); for (int i = tasks.size() - 1; i >= 0; i--) { removeTaskByIdLocked(tasks.get(i).taskId, false /* killProcess */, !REMOVE_FROM_RECENTS); mStackSupervisor.positionTaskInStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID, 0); } } Binder.restoreCallingIdentity(origId); Loading
core/java/android/app/ActivityManagerNative.java +5 −5 Original line number Diff line number Diff line Loading @@ -2718,10 +2718,10 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM reply.writeNoException(); return true; } case REMOVE_STACK_TRANSACTION: { case MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); final int stackId = data.readInt(); removeStack(stackId); moveTasksToFullscreenStack(stackId); reply.writeNoException(); return true; } Loading Loading @@ -6358,12 +6358,12 @@ class ActivityManagerProxy implements IActivityManager } @Override public void removeStack(int stackId) throws RemoteException { public void moveTasksToFullscreenStack(int fromStackId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(stackId); mRemote.transact(REMOVE_STACK_TRANSACTION, data, reply, 0); data.writeInt(fromStackId); mRemote.transact(MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); Loading
core/java/android/app/IActivityManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ public interface IActivityManager extends IInterface { public void suppressResizeConfigChanges(boolean suppress) throws RemoteException; public void removeStack(int stackId) throws RemoteException; public void moveTasksToFullscreenStack(int fromStackId) throws RemoteException; public int getAppStartMode(int uid, String packageName) throws RemoteException; Loading Loading @@ -906,7 +906,7 @@ public interface IActivityManager extends IInterface { int REPORT_SIZE_CONFIGURATIONS = IBinder.FIRST_CALL_TRANSACTION + 345; int MOVE_TASK_TO_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 346; int SUPPRESS_RESIZE_CONFIG_CHANGES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 347; int REMOVE_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 348; int MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 348; int MOVE_TOP_ACTIVITY_TO_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 349; int GET_APP_START_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 350; int UNLOCK_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 351; Loading
packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class WindowManagerProxy { @Override public void run() { try { ActivityManagerNative.getDefault().removeStack(DOCKED_STACK_ID); ActivityManagerNative.getDefault().moveTasksToFullscreenStack(DOCKED_STACK_ID); } catch (RemoteException e) { Log.w(TAG, "Failed to remove stack: " + e); } Loading
services/core/java/com/android/server/am/ActivityManagerService.java +14 −12 Original line number Diff line number Diff line Loading @@ -490,6 +490,8 @@ public final class ActivityManagerService extends ActivityManagerNative // Used to indicate that a task is removed it should also be removed from recents. private static final boolean REMOVE_FROM_RECENTS = true; // Used to indicate that an app transition should be animated. private static final boolean ANIMATE = true; private static native int nativeMigrateToBoost(); private static native int nativeMigrateFromBoost(); Loading Loading @@ -4333,7 +4335,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (task.stack.mStackId != launchStackId) { mStackSupervisor.moveTaskToStackLocked( taskId, launchStackId, ON_TOP, FORCE_FOCUS, "startActivityFromRecents", true /* animate */); ANIMATE); } } Loading Loading @@ -9314,7 +9316,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_STACK) Slog.d(TAG_STACK, "moveActivityToStack: moving r=" + r + " to stackId=" + stackId); mStackSupervisor.moveTaskToStackLocked(r.task.taskId, stackId, ON_TOP, !FORCE_FOCUS, "moveActivityToStack", true /* animate */); "moveActivityToStack", ANIMATE); } finally { Binder.restoreCallingIdentity(ident); } Loading @@ -9335,7 +9337,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToStack: moving task=" + taskId + " to stackId=" + stackId + " toTop=" + toTop); mStackSupervisor.moveTaskToStackLocked(taskId, stackId, toTop, !FORCE_FOCUS, "moveTaskToStack", true /* animate */); "moveTaskToStack", ANIMATE); } finally { Binder.restoreCallingIdentity(ident); } Loading Loading @@ -17779,20 +17781,20 @@ public final class ActivityManagerService extends ActivityManagerNative } @Override public void removeStack(int stackId) { public void moveTasksToFullscreenStack(int fromStackId) { enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS, "detahStack()"); if (stackId == HOME_STACK_ID) { throw new IllegalArgumentException("Removing home stack is not allowed."); "moveTasksToFullscreenStack()"); if (fromStackId == HOME_STACK_ID) { throw new IllegalArgumentException("You can't move tasks from the home stack."); } synchronized (this) { long origId = Binder.clearCallingIdentity(); ActivityStack stack = mStackSupervisor.getStack(stackId); final long origId = Binder.clearCallingIdentity(); final ActivityStack stack = mStackSupervisor.getStack(fromStackId); if (stack != null) { ArrayList<TaskRecord> tasks = stack.getAllTasks(); final ArrayList<TaskRecord> tasks = stack.getAllTasks(); for (int i = tasks.size() - 1; i >= 0; i--) { removeTaskByIdLocked(tasks.get(i).taskId, false /* killProcess */, !REMOVE_FROM_RECENTS); mStackSupervisor.positionTaskInStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID, 0); } } Binder.restoreCallingIdentity(origId);