summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibXZR <i@xzr.moe>2022-06-19 22:19:47 +0800
committeralk3pInjection <webmaster@raspii.tech>2022-06-29 16:52:50 +0800
commitf637d7a7cafb1540448d3622285bd6080e492a54 (patch)
tree14347cebb888474bd51490cf0f681700e28d6092
parenta00065dfa389ae1862387755d2dae3a960f85048 (diff)
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 <i@xzr.moe>
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java6
1 files changed, 6 insertions, 0 deletions
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());