Skip to content

Commit 71bfec4

Browse files
dsandlerAndroid Git Automerger
authored andcommitted
am 61b645a: Merge "Update all RSSIs whenever the connectivity changes." into ics-factoryrom
* commit '61b645ab86ace1511593f1f1f46dfb62bf0ae8b9': Update all RSSIs whenever the connectivity changes.
2 parents 8013290 + 61b645a commit 71bfec4

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -720,28 +720,19 @@ private void updateConnectivity(Intent intent) {
720720
Slog.d(TAG, "updateConnectivity: connectionStatus=" + connectionStatus);
721721
}
722722

723-
int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
724-
725-
switch (info.getType()) {
726-
case ConnectivityManager.TYPE_MOBILE:
727-
mInetCondition = inetCondition;
728-
updateDataNetType();
729-
updateDataIcon();
730-
updateTelephonySignalStrength(); // apply any change in connectionStatus
731-
break;
732-
case ConnectivityManager.TYPE_WIFI:
733-
mInetCondition = inetCondition;
734-
updateWifiIcons();
735-
break;
736-
case ConnectivityManager.TYPE_BLUETOOTH:
737-
mInetCondition = inetCondition;
738-
if (info != null) {
739-
mBluetoothTethered = info.isConnected() ? true: false;
740-
} else {
741-
mBluetoothTethered = false;
742-
}
743-
break;
723+
mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
724+
725+
if (info != null && info.getType() == ConnectivityManager.TYPE_BLUETOOTH) {
726+
mBluetoothTethered = info.isConnected() ? true: false;
727+
} else {
728+
mBluetoothTethered = false;
744729
}
730+
731+
// We want to update all the icons, all at once, for any condition change
732+
updateDataNetType();
733+
updateDataIcon();
734+
updateTelephonySignalStrength();
735+
updateWifiIcons();
745736
}
746737

747738

@@ -1035,8 +1026,8 @@ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
10351026
pw.println(mWifiLevel);
10361027
pw.print(" mWifiSsid=");
10371028
pw.println(mWifiSsid);
1038-
pw.print(" mWifiIconId=");
1039-
pw.println(mWifiIconId);
1029+
pw.print(String.format(" mWifiIconId=0x%08x/%s",
1030+
mWifiIconId, getResourceName(mWifiIconId)));
10401031
pw.print(" mWifiActivity=");
10411032
pw.println(mWifiActivity);
10421033

0 commit comments

Comments
 (0)