diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java index 6562f38e724d..afdb7a44f590 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java @@ -727,12 +727,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 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(); + 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; } |