diff options
| author | 2024-05-06 18:41:42 +0000 | |
|---|---|---|
| committer | 2024-05-06 18:41:42 +0000 | |
| commit | ea2fd638e7e87e024e4a8978029e5ac091d0ed33 (patch) | |
| tree | dddf726402a77db23e93dce40d2d94b492c3a366 | |
| parent | 08044638ec98a6d80fc0a4731e7a80d03a1a586c (diff) | |
| parent | 17193223efd0ec08502c17720d0837b62e195e09 (diff) | |
Merge "Fixed expand bubble stack position after the device is unfolded" into 24D1-dev
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index 96aaf02cb5e3..ea59715bc246 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -474,11 +474,16 @@ public class BubbleController implements ConfigurationChangeListener, mDisplayController.addDisplayChangingController( (displayId, fromRotation, toRotation, newDisplayAreaInfo, t) -> { - // This is triggered right before the rotation is applied - if (fromRotation != toRotation) { + Rect newScreenBounds = new Rect(); + if (newDisplayAreaInfo != null) { + newScreenBounds = + newDisplayAreaInfo.configuration.windowConfiguration.getBounds(); + } + // This is triggered right before the rotation or new screen size is applied + if (fromRotation != toRotation || !newScreenBounds.equals(mScreenBounds)) { if (mStackView != null) { // Layout listener set on stackView will update the positioner - // once the rotation is applied + // once the rotation or screen change is applied mStackView.onOrientationChanged(); } } |