Do not provide 5GHz option for softap if there is no country code available

Bug:19414134
Change-Id: I88da5c3d547522263394403c97147baabae45394
This commit is contained in:
xinhe
2015-02-23 15:58:21 -08:00
parent 18ae1d2207
commit b938c0e203
2 changed files with 17 additions and 0 deletions

View File

@@ -79,6 +79,8 @@ interface IWifiManager
void setCountryCode(String country, boolean persist);
String getCountryCode();
void setFrequencyBand(int band, boolean persist);
int getFrequencyBand();

View File

@@ -1237,6 +1237,21 @@ public class WifiManager {
} catch (RemoteException e) { }
}
/**
* get the country code.
* @return the country code in ISO 3166 format.
*
* @hide
*/
public String getCountryCode() {
try {
String country = mService.getCountryCode();
return(country);
} catch (RemoteException e) {
return null;
}
}
/**
* Set the operational frequency band.
* @param band One of