diff options
| author | 2011-09-26 12:39:01 -0700 | |
|---|---|---|
| committer | 2011-09-26 12:39:01 -0700 | |
| commit | 71bfec448847d8585c8a789596525dc729350877 (patch) | |
| tree | af39ef42e8ff8828c51bf04d44acd11cbfde4435 | |
| parent | 8013290dd0e9d3eabc3611d7eca47aa50bdceed0 (diff) | |
| parent | 61b645ab86ace1511593f1f1f46dfb62bf0ae8b9 (diff) | |
am 61b645ab: Merge "Update all RSSIs whenever the connectivity changes." into ics-factoryrom
* commit '61b645ab86ace1511593f1f1f46dfb62bf0ae8b9':
Update all RSSIs whenever the connectivity changes.
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index 0dfc4f7a55ba..c83c4708eac0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -720,28 +720,19 @@ public class NetworkController extends BroadcastReceiver { Slog.d(TAG, "updateConnectivity: connectionStatus=" + connectionStatus); } - int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); - - switch (info.getType()) { - case ConnectivityManager.TYPE_MOBILE: - mInetCondition = inetCondition; - updateDataNetType(); - updateDataIcon(); - updateTelephonySignalStrength(); // apply any change in connectionStatus - break; - case ConnectivityManager.TYPE_WIFI: - mInetCondition = inetCondition; - updateWifiIcons(); - break; - case ConnectivityManager.TYPE_BLUETOOTH: - mInetCondition = inetCondition; - if (info != null) { - mBluetoothTethered = info.isConnected() ? true: false; - } else { - mBluetoothTethered = false; - } - break; + mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); + + if (info != null && info.getType() == ConnectivityManager.TYPE_BLUETOOTH) { + mBluetoothTethered = info.isConnected() ? true: false; + } else { + mBluetoothTethered = false; } + + // We want to update all the icons, all at once, for any condition change + updateDataNetType(); + updateDataIcon(); + updateTelephonySignalStrength(); + updateWifiIcons(); } @@ -1035,8 +1026,8 @@ public class NetworkController extends BroadcastReceiver { pw.println(mWifiLevel); pw.print(" mWifiSsid="); pw.println(mWifiSsid); - pw.print(" mWifiIconId="); - pw.println(mWifiIconId); + pw.print(String.format(" mWifiIconId=0x%08x/%s", + mWifiIconId, getResourceName(mWifiIconId))); pw.print(" mWifiActivity="); pw.println(mWifiActivity); |