Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f9ca770 authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Log invalid expanded view width and height

Bug: 411307439
Flag: com.android.wm.shell.enable_bubble_bar
Test: treehugger
Change-Id: I8d5d0e8bda846b824d3ef6c020fe65f990daa9c6
parent 1328c4a3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -336,6 +336,14 @@ public class BubbleBarLayerView extends FrameLayout
            boolean isOverflowExpanded = b.getKey().equals(BubbleOverflow.KEY);
            final int width = mPositioner.getExpandedViewWidthForBubbleBar(isOverflowExpanded);
            final int height = mPositioner.getExpandedViewHeightForBubbleBar(isOverflowExpanded);
            if (width <= 0 || height <= 0) {
                Log.e(TAG,
                        String.format("got expanded view with non-positive width=%d or height=%d."
                                        + " this could result in the expanded view not having a"
                                        + " surface!",
                                width, height));
            }

            mExpandedView.setVisibility(GONE);
            mExpandedView.setY(mPositioner.getExpandedViewBottomForBubbleBar() - height);
            mExpandedView.setLayerBoundsSupplier(() -> new Rect(0, 0, getWidth(), getHeight()));