diff options
author | Vinit Deshpande <vinitd@google.com> | 2015-03-09 19:01:31 -0700 |
---|---|---|
committer | Vinit Deshpande <vinitd@google.com> | 2015-03-09 19:01:31 -0700 |
commit | b4499afde5cb4fe9e7c168af60d003e2c7df40a1 (patch) | |
tree | c9b90af1a7a63c584908537ec2c0dc8577212b55 /services | |
parent | 1aa4dcee03f75df4f96ac9d3653503e0ae027117 (diff) | |
parent | a0be0fb2709124a567f89114b1d8e80f74452edc (diff) | |
download | frameworks_base-b4499afde5cb4fe9e7c168af60d003e2c7df40a1.zip frameworks_base-b4499afde5cb4fe9e7c168af60d003e2c7df40a1.tar.gz frameworks_base-b4499afde5cb4fe9e7c168af60d003e2c7df40a1.tar.bz2 |
am "set softAP on a specified band, including both 2.4 and 5 GHz band"
merged from partner/m-wireless-wifi-dev
a0be0fb set softAP on a specified band, including both 2.4 and 5 GHz band
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/NetworkManagementService.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java index 8c56c8c..170c4e2 100644 --- a/services/core/java/com/android/server/NetworkManagementService.java +++ b/services/core/java/com/android/server/NetworkManagementService.java @@ -1373,8 +1373,15 @@ public class NetworkManagementService extends INetworkManagementService.Stub if (wifiConfig == null) { mConnector.execute("softap", "set", wlanIface); } else { + int apChannel; + if (wifiConfig.apChannel == 0) { + apChannel = WifiConfiguration.chooseApChannel(wifiConfig.apBand); + } else { + apChannel = wifiConfig.apChannel; + } mConnector.execute("softap", "set", wlanIface, wifiConfig.SSID, - "broadcast", "6", getSecurityType(wifiConfig), + "broadcast", Integer.toString(apChannel), + getSecurityType(wifiConfig), new SensitiveArg(wifiConfig.preSharedKey)); } mConnector.execute("softap", "startap"); |