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

Commit dabc1103 authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Use bottom stage bounds in determineHandlePosition." into main

parents d18b36f4 e5676f02
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -779,12 +779,17 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
        final Point position = new Point(mResult.mCaptionX, 0);
        if (mSplitScreenController.getSplitPosition(mTaskInfo.taskId)
                == SPLIT_POSITION_BOTTOM_OR_RIGHT
                && mDisplayController.getDisplayLayout(mTaskInfo.displayId).isLandscape()
        ) {
            if (mSplitScreenController.isLeftRightSplit()) {
                // If this is the right split task, add left stage's width.
                final Rect leftStageBounds = new Rect();
                mSplitScreenController.getStageBounds(leftStageBounds, new Rect());
                position.x += leftStageBounds.width();
            } else {
                final Rect bottomStageBounds = new Rect();
                mSplitScreenController.getRefStageBounds(new Rect(), bottomStageBounds);
                position.y += bottomStageBounds.top;
            }
        }
        return position;
    }