diff options
author | Rebecca Silberstein <silberst@google.com> | 2017-06-07 21:02:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-06-07 21:03:00 +0000 |
commit | 875a7dcc0db5b82c49a02741e779395388cf44c6 (patch) | |
tree | 238f06178dc4853e86f75052f2dac439f85f582c | |
parent | dea3f9fb315088dba8f6f5830b5c1917d5d29054 (diff) | |
parent | 1fdb6151dcc85c990483492e2d9cbd9b7c243164 (diff) | |
download | android_frameworks_opt_net_wifi-875a7dcc0db5b82c49a02741e779395388cf44c6.tar.gz android_frameworks_opt_net_wifi-875a7dcc0db5b82c49a02741e779395388cf44c6.tar.bz2 android_frameworks_opt_net_wifi-875a7dcc0db5b82c49a02741e779395388cf44c6.zip |
Merge "WifiApConfigStore: set LOHS wifi config networkId" into oc-dev
-rw-r--r-- | service/java/com/android/server/wifi/WifiApConfigStore.java | 1 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiApConfigStore.java b/service/java/com/android/server/wifi/WifiApConfigStore.java index 850c5aebe..9c90bcf47 100644 --- a/service/java/com/android/server/wifi/WifiApConfigStore.java +++ b/service/java/com/android/server/wifi/WifiApConfigStore.java @@ -218,6 +218,7 @@ public class WifiApConfigStore { R.string.wifi_localhotspot_configure_ssid_default) + "_" + getRandomIntForDefaultSsid(); config.allowedKeyManagement.set(KeyMgmt.WPA2_PSK); + config.networkId = WifiConfiguration.LOCAL_ONLY_NETWORK_ID; String randomUUID = UUID.randomUUID().toString(); // first 12 chars from xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx config.preSharedKey = randomUUID.substring(0, 8) + randomUUID.substring(9, 13); diff --git a/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java b/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java index d4a3ff549..2d3b06695 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java @@ -202,5 +202,7 @@ public class WifiApConfigStoreTest { public void generateLocalOnlyHotspotConfigIsValid() { WifiConfiguration config = WifiApConfigStore.generateLocalOnlyHotspotConfig(mContext); verifyDefaultApConfig(config, TEST_DEFAULT_HOTSPOT_SSID); + // The LOHS config should also have a specific network id set - check that as well. + assertEquals(WifiConfiguration.LOCAL_ONLY_NETWORK_ID, config.networkId); } } |