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
This commit is contained in:
Mady Mellor
2021-09-02 14:46:02 -07:00
parent e4c0330880
commit 45b2235bd6
2 changed files with 6 additions and 2 deletions

View File

@@ -628,8 +628,11 @@ public class BubbleController {
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();

View File

@@ -1315,6 +1315,7 @@ public class BubbleStackView extends FrameLayout
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mPositioner.update();
getViewTreeObserver().addOnComputeInternalInsetsListener(this);
getViewTreeObserver().addOnDrawListener(mSystemGestureExcludeUpdater);
}