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

Commit 06544a0c authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Log invalid expanded view width and height" into main

parents 2fe97d4c 9f9ca770
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()));