diff options
| author | 2024-05-01 08:51:39 +0000 | |
|---|---|---|
| committer | 2024-05-01 08:51:39 +0000 | |
| commit | b985adad6078d58e4eb1d612ab0e2f26d2dbdd92 (patch) | |
| tree | 5871ceee54bd6fcf7eeb8f9e31edb073741f4225 | |
| parent | 0eb2ee27d8a44ef07e416236ab2033563f53e14c (diff) | |
| parent | f1d4cb928fe711590e329a7f67121bfe9d13e74f (diff) | |
Merge "Fixed expand bubble stack position after the device is unfolded" into main
| -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 98b2431fecd9..edd5935b508d 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(); } } |