Loading core/java/android/app/ActivityManagerNative.java +5 −2 Original line number Diff line number Diff line Loading @@ -792,8 +792,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM if (hasBounds) { bounds = Rect.CREATOR.createFromParcel(data); } moveTaskToDockedStack(taskId, createMode, toTop, animate, bounds); boolean res = moveTaskToDockedStack(taskId, createMode, toTop, animate, bounds); reply.writeNoException(); reply.writeInt(res ? 1 : 0); return true; } Loading Loading @@ -3809,7 +3810,7 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } @Override public void moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) throws RemoteException { Parcel data = Parcel.obtain(); Loading @@ -3827,8 +3828,10 @@ class ActivityManagerProxy implements IActivityManager } mRemote.transact(MOVE_TASK_TO_DOCKED_STACK_TRANSACTION, data, reply, 0); reply.readException(); boolean res = reply.readInt() > 0; data.recycle(); reply.recycle(); return res; } @Override public boolean moveTopActivityToPinnedStack(int stackId, Rect r) Loading core/java/android/app/IActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ public interface IActivityManager extends IInterface { public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) throws RemoteException; public void moveTaskBackwards(int task) throws RemoteException; public void moveTaskToStack(int taskId, int stackId, boolean toTop) throws RemoteException; public void moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) throws RemoteException; public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) throws RemoteException; public void resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode, Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +8 −5 Original line number Diff line number Diff line Loading @@ -568,12 +568,15 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener // Make sure we inform DividerView before we actually start the activity so we can change // the resize mode already. if (ssp.moveTaskToDockedStack(topTaskId, stackCreateMode, initialBounds)) { EventBus.getDefault().send(new DockingTopTaskEvent(dragMode)); ssp.moveTaskToDockedStack(topTaskId, stackCreateMode, initialBounds); showRecents(false /* triggeredFromAltTab */, dragMode == NavigationBarGestureHelper.DRAG_MODE_RECENTS, false /* animate */, showRecents( false /* triggeredFromAltTab */, dragMode == NavigationBarGestureHelper.DRAG_MODE_RECENTS, false /* animate */, true /* reloadTasks*/); } } /** * Returns the preloaded load plan and invalidates it. Loading packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +7 −4 Original line number Diff line number Diff line Loading @@ -338,15 +338,18 @@ public class SystemServicesProxy { } /** Docks an already resumed task to the side of the screen. */ public void moveTaskToDockedStack(int taskId, int createMode, Rect initialBounds) { if (mIam == null) return; public boolean moveTaskToDockedStack(int taskId, int createMode, Rect initialBounds) { if (mIam == null) { return false; } try { mIam.moveTaskToDockedStack(taskId, createMode, true /* onTop */, false /* animate */, initialBounds); return mIam.moveTaskToDockedStack( taskId, createMode, true /* onTop */, false /* animate */, initialBounds); } catch (RemoteException e) { e.printStackTrace(); } return false; } /** Returns the focused stack id. */ Loading services/core/java/com/android/server/am/ActivityManagerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -9493,7 +9493,7 @@ public final class ActivityManagerService extends ActivityManagerNative * docked stack. Pass {@code null} to use default bounds. */ @Override public void moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveTaskToDockedStack()"); synchronized (this) { Loading @@ -9502,7 +9502,8 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToDockedStack: moving task=" + taskId + " to createMode=" + createMode + " toTop=" + toTop); mWindowManager.setDockedStackCreateState(createMode, initialBounds); mStackSupervisor.moveTaskToStackLocked(taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS, return mStackSupervisor.moveTaskToStackLocked( taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS, "moveTaskToDockedStack", animate); } finally { Binder.restoreCallingIdentity(ident); Loading Loading
core/java/android/app/ActivityManagerNative.java +5 −2 Original line number Diff line number Diff line Loading @@ -792,8 +792,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM if (hasBounds) { bounds = Rect.CREATOR.createFromParcel(data); } moveTaskToDockedStack(taskId, createMode, toTop, animate, bounds); boolean res = moveTaskToDockedStack(taskId, createMode, toTop, animate, bounds); reply.writeNoException(); reply.writeInt(res ? 1 : 0); return true; } Loading Loading @@ -3809,7 +3810,7 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } @Override public void moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) throws RemoteException { Parcel data = Parcel.obtain(); Loading @@ -3827,8 +3828,10 @@ class ActivityManagerProxy implements IActivityManager } mRemote.transact(MOVE_TASK_TO_DOCKED_STACK_TRANSACTION, data, reply, 0); reply.readException(); boolean res = reply.readInt() > 0; data.recycle(); reply.recycle(); return res; } @Override public boolean moveTopActivityToPinnedStack(int stackId, Rect r) Loading
core/java/android/app/IActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ public interface IActivityManager extends IInterface { public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) throws RemoteException; public void moveTaskBackwards(int task) throws RemoteException; public void moveTaskToStack(int taskId, int stackId, boolean toTop) throws RemoteException; public void moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) throws RemoteException; public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) throws RemoteException; public void resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode, Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +8 −5 Original line number Diff line number Diff line Loading @@ -568,12 +568,15 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener // Make sure we inform DividerView before we actually start the activity so we can change // the resize mode already. if (ssp.moveTaskToDockedStack(topTaskId, stackCreateMode, initialBounds)) { EventBus.getDefault().send(new DockingTopTaskEvent(dragMode)); ssp.moveTaskToDockedStack(topTaskId, stackCreateMode, initialBounds); showRecents(false /* triggeredFromAltTab */, dragMode == NavigationBarGestureHelper.DRAG_MODE_RECENTS, false /* animate */, showRecents( false /* triggeredFromAltTab */, dragMode == NavigationBarGestureHelper.DRAG_MODE_RECENTS, false /* animate */, true /* reloadTasks*/); } } /** * Returns the preloaded load plan and invalidates it. Loading
packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +7 −4 Original line number Diff line number Diff line Loading @@ -338,15 +338,18 @@ public class SystemServicesProxy { } /** Docks an already resumed task to the side of the screen. */ public void moveTaskToDockedStack(int taskId, int createMode, Rect initialBounds) { if (mIam == null) return; public boolean moveTaskToDockedStack(int taskId, int createMode, Rect initialBounds) { if (mIam == null) { return false; } try { mIam.moveTaskToDockedStack(taskId, createMode, true /* onTop */, false /* animate */, initialBounds); return mIam.moveTaskToDockedStack( taskId, createMode, true /* onTop */, false /* animate */, initialBounds); } catch (RemoteException e) { e.printStackTrace(); } return false; } /** Returns the focused stack id. */ Loading
services/core/java/com/android/server/am/ActivityManagerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -9493,7 +9493,7 @@ public final class ActivityManagerService extends ActivityManagerNative * docked stack. Pass {@code null} to use default bounds. */ @Override public void moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveTaskToDockedStack()"); synchronized (this) { Loading @@ -9502,7 +9502,8 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToDockedStack: moving task=" + taskId + " to createMode=" + createMode + " toTop=" + toTop); mWindowManager.setDockedStackCreateState(createMode, initialBounds); mStackSupervisor.moveTaskToStackLocked(taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS, return mStackSupervisor.moveTaskToStackLocked( taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS, "moveTaskToDockedStack", animate); } finally { Binder.restoreCallingIdentity(ident); Loading