OSDN Git Service

Repair wifi/cellular kerning.
authorDan Sandler <dsandler@android.com>
Mon, 8 Dec 2014 20:00:09 +0000 (15:00 -0500)
committerDan Sandler <dsandler@android.com>
Tue, 9 Dec 2014 14:36:46 +0000 (14:36 +0000)
The wifi spacer should only be shown if the first mobile
network has a data type indicator.

Bug: 18665813
Change-Id: Ifcd3a61ebc8cdb76d134baa23b22f1291edadd28

packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java

index 8e50abe..8e35ee9 100644 (file)
@@ -277,9 +277,13 @@ public class SignalClusterView
                     mWifiStrengthId));
 
         boolean anyMobileVisible = false;
+        int firstMobileTypeId = 0;
         for (PhoneState state : mPhoneStates) {
             if (state.apply(anyMobileVisible)) {
-                anyMobileVisible = true;
+                if (!anyMobileVisible) {
+                    firstMobileTypeId = state.mMobileTypeId;
+                    anyMobileVisible = true;
+                }
             }
         }
 
@@ -298,7 +302,7 @@ public class SignalClusterView
             mWifiAirplaneSpacer.setVisibility(View.GONE);
         }
 
-        if ((anyMobileVisible || mNoSimsVisible) && mWifiVisible) {
+        if (((anyMobileVisible && firstMobileTypeId != 0) || mNoSimsVisible) && mWifiVisible) {
             mWifiSignalSpacer.setVisibility(View.VISIBLE);
         } else {
             mWifiSignalSpacer.setVisibility(View.GONE);