Correctly apply transaction on the end of veiled resize.

Fixes a bug where a resize would not apply on the task surface on the
end of drag.

Bug: 274773589
Test: Manual, confirm drag end correctly resizes task.
Test: atest WMShellUnitTests:VeiledResizeTaskPositionerTest
Change-Id: Idf2ebc09f551f6a8de6419c8dc0f146311364deb
This commit is contained in:
mattsziklay
2023-04-26 14:54:07 -07:00
committed by Matt Sziklay
parent 173bf3565e
commit 94d63e4f34

View File

@@ -86,9 +86,10 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback {
public void onDragPositioningEnd(float x, float y) {
PointF delta = DragPositioningCallbackUtility.calculateDelta(x, y,
mRepositionStartPoint);
if (mHasMoved && DragPositioningCallbackUtility.changeBounds(mCtrlType, mHasMoved,
mRepositionTaskBounds, mTaskBoundsAtDragStart, mStableBounds, delta,
mDisplayController, mDesktopWindowDecoration)) {
if (mHasMoved) {
DragPositioningCallbackUtility.changeBounds(mCtrlType, mHasMoved,
mRepositionTaskBounds, mTaskBoundsAtDragStart, mStableBounds, delta,
mDisplayController, mDesktopWindowDecoration);
DragPositioningCallbackUtility.applyTaskBoundsChange(
new WindowContainerTransaction(), mDesktopWindowDecoration,
mRepositionTaskBounds, mTaskOrganizer);