commit | 45b2235bd666b64d4171cc33524e54b1dc611785 | [log] [tgz] |
---|---|---|
author | Mady Mellor <madym@google.com> | Thu Sep 02 14:46:02 2021 -0700 |
committer | Mady Mellor <madym@google.com> | Thu Sep 02 14:46:26 2021 -0700 |
tree | 2d652c1e5595c1603d2fcb8ab6bd39905071f28e | |
parent | e4c0330880154f7556dc69fe1661bdd456b27add [diff] |
Fix an issue with bubbles overlapping the taskbar Test: manual - have bubbles opened, rotate device => observe that bubbles don't overlap Bug: 196857292 Change-Id: Ic108852e516e18441c265e8a03b0524c4b589b4f
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 95b80df..9dafefe 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
@@ -628,8 +628,11 @@ mAddedToWindowManager = true; mBubbleData.getOverflow().initialize(this); mWindowManager.addView(mStackView, mWmLayoutParams); - // Position info is dependent on us being attached to a window - mBubblePositioner.update(); + mStackView.setOnApplyWindowInsetsListener((view, windowInsets) -> { + mBubblePositioner.update(); + mStackView.onDisplaySizeChanged(); + return windowInsets; + }); } catch (IllegalStateException e) { // This means the stack has already been added. This shouldn't happen... e.printStackTrace();
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 5a51eed..5bc6128 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
@@ -1315,6 +1315,7 @@ @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); + mPositioner.update(); getViewTreeObserver().addOnComputeInternalInsetsListener(this); getViewTreeObserver().addOnDrawListener(mSystemGestureExcludeUpdater); }