@@ -1347,14 +1347,14 @@ private void setCountryCode() {
13471347 setCountryCode (countryCode , false );
13481348 } else {
13491349 // On wifi-only devices, some drivers don't find hidden SSIDs unless DRIVER COUNTRY
1350- // is called. Pinging the wifi driver without country code resolves this issue .
1350+ // is called. Use the default country code to ping the driver .
13511351 ConnectivityManager cm =
13521352 (ConnectivityManager )mContext .getSystemService (Context .CONNECTIVITY_SERVICE );
13531353 if (!cm .isNetworkSupported (ConnectivityManager .TYPE_MOBILE )) {
1354- setCountryCode (null , false );
1354+ setCountryCode (mCountryCode , false );
13551355 }
13561356
1357- // In other case, mmc tables from carrier do the trick of starting up the wifi driver
1357+ // In other case, mcc tables from carrier do the trick of starting up the wifi driver
13581358 }
13591359 }
13601360
@@ -2811,14 +2811,12 @@ public boolean processMessage(Message message) {
28112811 break ;
28122812 case CMD_SET_COUNTRY_CODE :
28132813 String country = (String ) message .obj ;
2814- if (DBG ) log ("set country code " + country );
28152814 String countryCode = country != null ? country .toUpperCase () : null ;
2815+ if (DBG ) log ("set country code " + countryCode );
28162816 if (mWifiNative .setCountryCode (countryCode )) {
2817- if (countryCode != null ) {
2818- mCountryCode = countryCode ;
2819- }
2817+ mCountryCode = countryCode ;
28202818 } else {
2821- loge ("Failed to set country code " + country );
2819+ loge ("Failed to set country code " + countryCode );
28222820 }
28232821 break ;
28242822 case CMD_SET_FREQUENCY_BAND :
0 commit comments