Loading core/java/android/view/IPinnedStackController.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -28,4 +28,9 @@ interface IPinnedStackController { * Notifies the controller that the PiP is currently minimized. */ oneway void setIsMinimized(boolean isMinimized); /** * @return what WM considers to be the current device rotation. */ int getDisplayRotation(); } core/java/android/view/IPinnedStackListener.aidl +5 −1 Original line number Diff line number Diff line Loading @@ -41,9 +41,13 @@ oneway interface IPinnedStackListener { * current state with the aspect ratio applied. The {@param animatingBounds} are provided * to indicate the current target bounds of the pinned stack (the final bounds if animating, * the current bounds if not), which may be helpful in calculating dependent animation bounds. * * The {@param displayRotation} is provided so that the client can verify when making certain * calls that it will not provide stale information based on an old display rotation (ie. if * the WM has changed in the mean time but the client has not received onMovementBoundsChanged). */ void onMovementBoundsChanged(in Rect insetBounds, in Rect normalBounds, in Rect animatingBounds, boolean fromImeAdjustement); boolean fromImeAdjustement, int displayRotation); /** * Called when window manager decides to adjust the pinned stack bounds because of the IME, or Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -143,10 +143,10 @@ public class PipManager implements BasePipManager { @Override public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds, Rect animatingBounds, boolean fromImeAdjustement) { Rect animatingBounds, boolean fromImeAdjustement, int displayRotation) { mHandler.post(() -> { mTouchHandler.onMovementBoundsChanged(insetBounds, normalBounds, animatingBounds, fromImeAdjustement); fromImeAdjustement, displayRotation); }); } Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -220,6 +220,13 @@ public class PipMenuActivity extends Activity { finish(); } @Override protected void onStop() { super.onStop(); cancelDelayedFinish(); } @Override protected void onDestroy() { super.onDestroy(); Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java +7 −2 Original line number Diff line number Diff line Loading @@ -316,7 +316,8 @@ public class PipMotionHelper { * Animates the PiP from the expanded state to the normal state after the menu is hidden. */ void animateToUnexpandedState(Rect normalBounds, float savedSnapFraction, Rect normalMovementBounds, Rect currentMovementBounds, boolean minimized) { Rect normalMovementBounds, Rect currentMovementBounds, boolean minimized, boolean immediate) { if (savedSnapFraction < 0f) { // If there are no saved snap fractions, then just use the current bounds savedSnapFraction = mSnapAlgorithm.getSnapFraction(new Rect(mBounds), Loading @@ -326,8 +327,12 @@ public class PipMotionHelper { if (minimized) { normalBounds = getClosestMinimizedBounds(normalBounds, normalMovementBounds); } if (immediate) { movePip(normalBounds); } else { resizeAndAnimatePipUnchecked(normalBounds, SHRINK_STACK_FROM_MENU_DURATION); } } /** * Animates the PiP to offset it from the IME. Loading Loading
core/java/android/view/IPinnedStackController.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -28,4 +28,9 @@ interface IPinnedStackController { * Notifies the controller that the PiP is currently minimized. */ oneway void setIsMinimized(boolean isMinimized); /** * @return what WM considers to be the current device rotation. */ int getDisplayRotation(); }
core/java/android/view/IPinnedStackListener.aidl +5 −1 Original line number Diff line number Diff line Loading @@ -41,9 +41,13 @@ oneway interface IPinnedStackListener { * current state with the aspect ratio applied. The {@param animatingBounds} are provided * to indicate the current target bounds of the pinned stack (the final bounds if animating, * the current bounds if not), which may be helpful in calculating dependent animation bounds. * * The {@param displayRotation} is provided so that the client can verify when making certain * calls that it will not provide stale information based on an old display rotation (ie. if * the WM has changed in the mean time but the client has not received onMovementBoundsChanged). */ void onMovementBoundsChanged(in Rect insetBounds, in Rect normalBounds, in Rect animatingBounds, boolean fromImeAdjustement); boolean fromImeAdjustement, int displayRotation); /** * Called when window manager decides to adjust the pinned stack bounds because of the IME, or Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -143,10 +143,10 @@ public class PipManager implements BasePipManager { @Override public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds, Rect animatingBounds, boolean fromImeAdjustement) { Rect animatingBounds, boolean fromImeAdjustement, int displayRotation) { mHandler.post(() -> { mTouchHandler.onMovementBoundsChanged(insetBounds, normalBounds, animatingBounds, fromImeAdjustement); fromImeAdjustement, displayRotation); }); } Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -220,6 +220,13 @@ public class PipMenuActivity extends Activity { finish(); } @Override protected void onStop() { super.onStop(); cancelDelayedFinish(); } @Override protected void onDestroy() { super.onDestroy(); Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java +7 −2 Original line number Diff line number Diff line Loading @@ -316,7 +316,8 @@ public class PipMotionHelper { * Animates the PiP from the expanded state to the normal state after the menu is hidden. */ void animateToUnexpandedState(Rect normalBounds, float savedSnapFraction, Rect normalMovementBounds, Rect currentMovementBounds, boolean minimized) { Rect normalMovementBounds, Rect currentMovementBounds, boolean minimized, boolean immediate) { if (savedSnapFraction < 0f) { // If there are no saved snap fractions, then just use the current bounds savedSnapFraction = mSnapAlgorithm.getSnapFraction(new Rect(mBounds), Loading @@ -326,8 +327,12 @@ public class PipMotionHelper { if (minimized) { normalBounds = getClosestMinimizedBounds(normalBounds, normalMovementBounds); } if (immediate) { movePip(normalBounds); } else { resizeAndAnimatePipUnchecked(normalBounds, SHRINK_STACK_FROM_MENU_DURATION); } } /** * Animates the PiP to offset it from the IME. Loading