diff options
| author | 2023-12-05 10:56:23 -0500 | |
|---|---|---|
| committer | 2023-12-05 10:56:23 -0500 | |
| commit | 3b6832b394d7de364d2d48ed45e54adfa33a466e (patch) | |
| tree | 49f159019ea528a2694bf66f1a2e822d66dd8da2 | |
| parent | 6ea41f315c98e068f67be6ebc839074814024ffb (diff) | |
Fix manage menu position after rotation
If the manage menu is shown after rotation, post it to the looper
to make sure the position is correct.
Bug: 311498135
Test: Manual -- repeatedly rotate and observe menu position
Change-Id: I9bf9e66637452823f8be538b5b253f3000b574ce
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index ff4da853654d..65db69ad1904 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -1023,7 +1023,13 @@ public class BubbleStackView extends FrameLayout updateOverflowVisibility(); updatePointerPosition(false); requestUpdate(); - showManageMenu(mShowingManage); + if (mShowingManage) { + // if we're showing the menu after rotation, post it to the looper + // to make sure that the location of the menu button is correct + post(() -> showManageMenu(true)); + } else { + showManageMenu(false); + } PointF p = mPositioner.getExpandedBubbleXY(getBubbleIndex(mExpandedBubble), getState()); |