Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff02ab6b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Enforce max size for resizing operations." into rvc-dev am:...

Merge "Merge "Enforce max size for resizing operations." into rvc-dev am: c43997ba am: 3f87a39a am: 68930175" into rvc-qpr-dev-plus-aosp am: f7ba5f34

Change-Id: I64d08baba71f93a4830d1603da19f7bf6c4e3c67
parents 25fa3d8a f7ba5f34
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -91,14 +91,14 @@ public class TaskResizingAlgorithm {
        int width = right - left;
        int height = bottom - top;
        if ((ctrlType & CTRL_LEFT) != 0) {
            width = Math.max(minVisibleWidth, width - deltaX);
            width = Math.max(minVisibleWidth, Math.min(width - deltaX, maxVisibleSize.x));
        } else if ((ctrlType & CTRL_RIGHT) != 0) {
            width = Math.max(minVisibleWidth, width + deltaX);
            width = Math.max(minVisibleWidth, Math.min(width + deltaX, maxVisibleSize.x));
        }
        if ((ctrlType & CTRL_TOP) != 0) {
            height = Math.max(minVisibleHeight, height - deltaY);
            height = Math.max(minVisibleHeight, Math.min(height - deltaY, maxVisibleSize.y));
        } else if ((ctrlType & CTRL_BOTTOM) != 0) {
            height = Math.max(minVisibleHeight, height + deltaY);
            height = Math.max(minVisibleHeight, Math.min(height + deltaY, maxVisibleSize.y));
        }

        // If we have to preserve the orientation - check that we are doing so.