@@ -719,28 +719,19 @@ private void updateConnectivity(Intent intent) {
719719 Slog .d (TAG , "updateConnectivity: connectionStatus=" + connectionStatus );
720720 }
721721
722- int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0 );
723-
724- switch (info .getType ()) {
725- case ConnectivityManager .TYPE_MOBILE :
726- mInetCondition = inetCondition ;
727- updateDataNetType ();
728- updateDataIcon ();
729- updateTelephonySignalStrength (); // apply any change in connectionStatus
730- break ;
731- case ConnectivityManager .TYPE_WIFI :
732- mInetCondition = inetCondition ;
733- updateWifiIcons ();
734- break ;
735- case ConnectivityManager .TYPE_BLUETOOTH :
736- mInetCondition = inetCondition ;
737- if (info != null ) {
738- mBluetoothTethered = info .isConnected () ? true : false ;
739- } else {
740- mBluetoothTethered = false ;
741- }
742- break ;
722+ mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0 );
723+
724+ if (info != null && info .getType () == ConnectivityManager .TYPE_BLUETOOTH ) {
725+ mBluetoothTethered = info .isConnected () ? true : false ;
726+ } else {
727+ mBluetoothTethered = false ;
743728 }
729+
730+ // We want to update all the icons, all at once, for any condition change
731+ updateDataNetType ();
732+ updateDataIcon ();
733+ updateTelephonySignalStrength ();
734+ updateWifiIcons ();
744735 }
745736
746737
@@ -1033,8 +1024,8 @@ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
10331024 pw .println (mWifiLevel );
10341025 pw .print (" mWifiSsid=" );
10351026 pw .println (mWifiSsid );
1036- pw .print (" mWifiIconId=" );
1037- pw . println (mWifiIconId );
1027+ pw .print (String . format ( " mWifiIconId=0x%08x/%s" ,
1028+ mWifiIconId , getResourceName (mWifiIconId )) );
10381029 pw .print (" mWifiActivity=" );
10391030 pw .println (mWifiActivity );
10401031
0 commit comments