From 32d17f143863dbd3f35455ab8ba02291635ef208 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Fri, 31 Jan 2020 10:43:19 -0800 Subject: [PATCH] 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 --- .../bubbles/animation/ExpandedAnimationController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java index aa549dc23f9b7..607b5ef9b2c26 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java @@ -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