Loading cmds/am/src/com/android/commands/am/Am.java +1 −1 Original line number Diff line number Diff line Loading @@ -1814,7 +1814,7 @@ public class Am extends BaseCommand { private void resizeStackUnchecked(int stackId, Rect bounds, int delayMs, boolean animate) { try { mAm.resizeStack(stackId, bounds, false, false, animate); mAm.resizeStack(stackId, bounds, false, false, animate, -1); Thread.sleep(delayMs); } catch (RemoteException e) { showError("Error: resizing stack " + e); Loading core/java/android/app/ActivityManagerNative.java +6 −2 Original line number Diff line number Diff line Loading @@ -820,7 +820,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM final boolean allowResizeInDockedMode = data.readInt() == 1; final boolean preserveWindows = data.readInt() == 1; final boolean animate = data.readInt() == 1; resizeStack(stackId, r, allowResizeInDockedMode, preserveWindows, animate); final int animationDuration = data.readInt(); resizeStack(stackId, r, allowResizeInDockedMode, preserveWindows, animate, animationDuration); reply.writeNoException(); return true; } Loading Loading @@ -3889,7 +3891,8 @@ class ActivityManagerProxy implements IActivityManager } @Override public void resizeStack(int stackId, Rect r, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate) throws RemoteException { boolean preserveWindows, boolean animate, int animationDuration) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); Loading @@ -3903,6 +3906,7 @@ class ActivityManagerProxy implements IActivityManager data.writeInt(allowResizeInDockedMode ? 1 : 0); data.writeInt(preserveWindows ? 1 : 0); data.writeInt(animate ? 1 : 0); data.writeInt(animationDuration); mRemote.transact(RESIZE_STACK_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); Loading core/java/android/app/IActivityManager.java +16 −1 Original line number Diff line number Diff line Loading @@ -148,8 +148,23 @@ public interface IActivityManager extends IInterface { public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) throws RemoteException; public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) throws RemoteException; /** * Resizes the input stack id to the given bounds. * * @param stackId Id of the stack to resize. * @param bounds Bounds to resize the stack to or {@code null} for fullscreen. * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is * active. * @param preserveWindows True if the windows of activities contained in the stack should be * preserved. * @param animate True if the stack resize should be animated. * @param animationDuration The duration of the resize animation in milliseconds or -1 if the * default animation duration should be used. * @throws RemoteException */ public void resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate) throws RemoteException; boolean preserveWindows, boolean animate, int animationDuration) throws RemoteException; /** * Moves all tasks from the docked stack in the fullscreen stack and puts the top task of the Loading packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +2 −2 Original line number Diff line number Diff line Loading @@ -100,8 +100,8 @@ public class WindowManagerProxy { @Override public void run() { try { ActivityManagerNative.getDefault().resizeStack(DOCKED_STACK_ID, null, true, true, false); ActivityManagerNative.getDefault().resizeStack( DOCKED_STACK_ID, null, true, true, false, -1); } catch (RemoteException e) { Log.w(TAG, "Failed to resize stack: " + e); } Loading packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -385,7 +385,7 @@ public class PipManager { break; } try { mActivityManager.resizeStack(PINNED_STACK_ID, mCurrentPipBounds, true, true, true); mActivityManager.resizeStack(PINNED_STACK_ID, mCurrentPipBounds, true, true, true, -1); } catch (RemoteException e) { Log.e(TAG, "showPipMenu failed", e); } Loading Loading
cmds/am/src/com/android/commands/am/Am.java +1 −1 Original line number Diff line number Diff line Loading @@ -1814,7 +1814,7 @@ public class Am extends BaseCommand { private void resizeStackUnchecked(int stackId, Rect bounds, int delayMs, boolean animate) { try { mAm.resizeStack(stackId, bounds, false, false, animate); mAm.resizeStack(stackId, bounds, false, false, animate, -1); Thread.sleep(delayMs); } catch (RemoteException e) { showError("Error: resizing stack " + e); Loading
core/java/android/app/ActivityManagerNative.java +6 −2 Original line number Diff line number Diff line Loading @@ -820,7 +820,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM final boolean allowResizeInDockedMode = data.readInt() == 1; final boolean preserveWindows = data.readInt() == 1; final boolean animate = data.readInt() == 1; resizeStack(stackId, r, allowResizeInDockedMode, preserveWindows, animate); final int animationDuration = data.readInt(); resizeStack(stackId, r, allowResizeInDockedMode, preserveWindows, animate, animationDuration); reply.writeNoException(); return true; } Loading Loading @@ -3889,7 +3891,8 @@ class ActivityManagerProxy implements IActivityManager } @Override public void resizeStack(int stackId, Rect r, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate) throws RemoteException { boolean preserveWindows, boolean animate, int animationDuration) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); Loading @@ -3903,6 +3906,7 @@ class ActivityManagerProxy implements IActivityManager data.writeInt(allowResizeInDockedMode ? 1 : 0); data.writeInt(preserveWindows ? 1 : 0); data.writeInt(animate ? 1 : 0); data.writeInt(animationDuration); mRemote.transact(RESIZE_STACK_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); Loading
core/java/android/app/IActivityManager.java +16 −1 Original line number Diff line number Diff line Loading @@ -148,8 +148,23 @@ public interface IActivityManager extends IInterface { public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds) throws RemoteException; public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) throws RemoteException; /** * Resizes the input stack id to the given bounds. * * @param stackId Id of the stack to resize. * @param bounds Bounds to resize the stack to or {@code null} for fullscreen. * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is * active. * @param preserveWindows True if the windows of activities contained in the stack should be * preserved. * @param animate True if the stack resize should be animated. * @param animationDuration The duration of the resize animation in milliseconds or -1 if the * default animation duration should be used. * @throws RemoteException */ public void resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate) throws RemoteException; boolean preserveWindows, boolean animate, int animationDuration) throws RemoteException; /** * Moves all tasks from the docked stack in the fullscreen stack and puts the top task of the Loading
packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +2 −2 Original line number Diff line number Diff line Loading @@ -100,8 +100,8 @@ public class WindowManagerProxy { @Override public void run() { try { ActivityManagerNative.getDefault().resizeStack(DOCKED_STACK_ID, null, true, true, false); ActivityManagerNative.getDefault().resizeStack( DOCKED_STACK_ID, null, true, true, false, -1); } catch (RemoteException e) { Log.w(TAG, "Failed to resize stack: " + e); } Loading
packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -385,7 +385,7 @@ public class PipManager { break; } try { mActivityManager.resizeStack(PINNED_STACK_ID, mCurrentPipBounds, true, true, true); mActivityManager.resizeStack(PINNED_STACK_ID, mCurrentPipBounds, true, true, true, -1); } catch (RemoteException e) { Log.e(TAG, "showPipMenu failed", e); } Loading