From f637d7a7cafb1540448d3622285bd6080e492a54 Mon Sep 17 00:00:00 2001 From: LibXZR Date: Sun, 19 Jun 2022 22:19:47 +0800 Subject: SystemUI: Fix suspicious spaces around mobile icons When dual SIM is in use, I could observe random but suspicious spaces around mobile signal icons. This could happened especially after expanding and collapsing the QS panel. This is caused by unmatched size between StatusBarMobileView and its only child. More debugging deepening into the sdk is needed for me to find out the real reason. I'm lazy, so let's bind the measurement to its only child for a quick fix. Change-Id: Id6b4e38b31a9de5061ac332d319d313ecf11c177 Signed-off-by: LibXZR --- .../src/com/android/systemui/statusbar/StatusBarMobileView.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java index 13cfddd2b0bb..10ca8ea0c2b5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java @@ -108,6 +108,12 @@ public class StatusBarMobileView extends FrameLayout implements DarkReceiver, outRect.bottom += translationY; } + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + mMobileGroup.measure(widthMeasureSpec, heightMeasureSpec); + setMeasuredDimension(mMobileGroup.getMeasuredWidth(), mMobileGroup.getMeasuredHeight()); + } + private void init(boolean providerModel) { mProviderModel = providerModel; mDualToneHandler = new DualToneHandler(getContext()); -- cgit v1.2.3