diff options
author | xinhe <xinhe@google.com> | 2015-02-23 15:58:21 -0800 |
---|---|---|
committer | xinhe <xinhe@google.com> | 2015-02-23 15:58:21 -0800 |
commit | b938c0e2036d28df24ec626fc8ed7e277248b9a6 (patch) | |
tree | 1534ffa016cec9a95020919f3c27a5d0b2efdc0a | |
parent | 18ae1d22077e1cd8ed71b1e74d14a3a2c4e50a62 (diff) | |
download | frameworks_base-b938c0e2036d28df24ec626fc8ed7e277248b9a6.zip frameworks_base-b938c0e2036d28df24ec626fc8ed7e277248b9a6.tar.gz frameworks_base-b938c0e2036d28df24ec626fc8ed7e277248b9a6.tar.bz2 |
Do not provide 5GHz option for softap if there is no country code available
Bug:19414134
Change-Id: I88da5c3d547522263394403c97147baabae45394
-rw-r--r-- | wifi/java/android/net/wifi/IWifiManager.aidl | 2 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index b87a1e9..bc95a36 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -79,6 +79,8 @@ interface IWifiManager void setCountryCode(String country, boolean persist); + String getCountryCode(); + void setFrequencyBand(int band, boolean persist); int getFrequencyBand(); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index b001bb8..40d40bb 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1238,6 +1238,21 @@ public class WifiManager { } /** + * 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 * {@link #WIFI_FREQUENCY_BAND_AUTO}, |