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

Commit 32d17f14 authored by Lyn Han's avatar Lyn Han
Browse files

Consistent portrait/landscape spacing

as temporary workaround for VirtualDisplay orientation change leaking
into SystemUI

Fixes: 148247663
Bug: 148675523
Test: manual - click into overflow, click bubble - no spacing change
Test: manual - expanded bubbles - rotate phone to landscape - no spacing change, bubbles left aligned
Change-Id: Ib17d84f5044cf6e4c8111385560bfc533fcad303
parent e2deab50
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -388,8 +388,11 @@ public class ExpandedAnimationController
        mBubblesMaxRendered = res.getInteger(R.integer.bubbles_max_rendered);

        // Includes overflow button.
        float totalGapWidth = getWidthForDisplayingBubbles() - (mExpandedViewPadding * 2)
                - (mBubblesMaxRendered + 1) * mBubbleSizePx;
        // TODO(b/148675523) this is a temporary work around; change back once we have proper fix.
//        float totalGapWidth = getWidthForDisplayingBubbles() - (mExpandedViewPadding * 2)
//                - (mBubblesMaxRendered + 1) * mBubbleSizePx;
        float totalGapWidth = getAvailableScreenWidth(true /* includeStableInsets */)
                - (mExpandedViewPadding * 2) - (mBubblesMaxRendered + 1) * mBubbleSizePx;
        mSpaceBetweenBubbles = totalGapWidth / mBubblesMaxRendered;

        // Ensure that all child views are at 1x scale, and visible, in case they were animating