From b938c0e2036d28df24ec626fc8ed7e277248b9a6 Mon Sep 17 00:00:00 2001 From: xinhe Date: Mon, 23 Feb 2015 15:58:21 -0800 Subject: Do not provide 5GHz option for softap if there is no country code available Bug:19414134 Change-Id: I88da5c3d547522263394403c97147baabae45394 --- wifi/java/android/net/wifi/IWifiManager.aidl | 2 ++ wifi/java/android/net/wifi/WifiManager.java | 15 +++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'wifi/java') 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}, -- cgit v1.1