Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -233,7 +233,10 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio @Override public void onAspectRatioChanged(float aspectRatio) { mHandler.post(() -> mPipBoundsHandler.onAspectRatioChanged(aspectRatio)); mHandler.post(() -> { mPipBoundsHandler.onAspectRatioChanged(aspectRatio); mTouchHandler.onAspectRatioChanged(); }); } } Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java +4 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,10 @@ public class PipResizeGestureHandler { mUserResizeBounds.set(bounds); } void invalidateUserResizeBounds() { mUserResizeBounds.setEmpty(); } Rect getUserResizeBounds() { return mUserResizeBounds; } Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java +13 −0 Original line number Diff line number Diff line Loading @@ -426,8 +426,21 @@ public class PipTouchHandler { } } /** * Responds to IPinnedStackListener on resetting aspect ratio for the pinned window. */ public void onAspectRatioChanged() { mPipResizeGestureHandler.invalidateUserResizeBounds(); } public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds, Rect curBounds, boolean fromImeAdjustment, boolean fromShelfAdjustment, int displayRotation) { // Set the user resized bounds equal to the new normal bounds in case they were // invalidated (e.g. by an aspect ratio change). if (mPipResizeGestureHandler.getUserResizeBounds().isEmpty()) { mPipResizeGestureHandler.setUserResizeBounds(normalBounds); } final int bottomOffset = mIsImeShowing ? mImeHeight : 0; final boolean fromDisplayRotationChanged = (mDisplayRotation != displayRotation); if (fromDisplayRotationChanged) { Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -233,7 +233,10 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio @Override public void onAspectRatioChanged(float aspectRatio) { mHandler.post(() -> mPipBoundsHandler.onAspectRatioChanged(aspectRatio)); mHandler.post(() -> { mPipBoundsHandler.onAspectRatioChanged(aspectRatio); mTouchHandler.onAspectRatioChanged(); }); } } Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java +4 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,10 @@ public class PipResizeGestureHandler { mUserResizeBounds.set(bounds); } void invalidateUserResizeBounds() { mUserResizeBounds.setEmpty(); } Rect getUserResizeBounds() { return mUserResizeBounds; } Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java +13 −0 Original line number Diff line number Diff line Loading @@ -426,8 +426,21 @@ public class PipTouchHandler { } } /** * Responds to IPinnedStackListener on resetting aspect ratio for the pinned window. */ public void onAspectRatioChanged() { mPipResizeGestureHandler.invalidateUserResizeBounds(); } public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds, Rect curBounds, boolean fromImeAdjustment, boolean fromShelfAdjustment, int displayRotation) { // Set the user resized bounds equal to the new normal bounds in case they were // invalidated (e.g. by an aspect ratio change). if (mPipResizeGestureHandler.getUserResizeBounds().isEmpty()) { mPipResizeGestureHandler.setUserResizeBounds(normalBounds); } final int bottomOffset = mIsImeShowing ? mImeHeight : 0; final boolean fromDisplayRotationChanged = (mDisplayRotation != displayRotation); if (fromDisplayRotationChanged) { Loading