diff options
| author | 2024-12-09 23:56:52 -0800 | |
|---|---|---|
| committer | 2024-12-10 14:22:42 -0800 | |
| commit | e5676f02e62162058ac2f498517b51cc4aa29512 (patch) | |
| tree | 4abdf5381b9bb44bbf949b080b1a5d8fd5bc8bc0 | |
| parent | e7b1ff94227286a9fb9391863fa8fb0bfbf67759 (diff) | |
Use bottom stage bounds in determineHandlePosition.
Fixes an issue where bottom split task still would get a status bar
input layer due to determineHandlePosition never actually calculating a
position below the status bar. This resulted in top-split handles
opening the handle menu on bottom-split tasks.
Bug: 380879525
Bug: 343561161
Test: Manual
Flag: EXEMPT bugfix
Change-Id: I471ea378fbc3f8affd14641883e44f5ee182a3b4
| -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; } |