From 1fdb6151dcc85c990483492e2d9cbd9b7c243164 Mon Sep 17 00:00:00 2001 From: Rebecca Silberstein Date: Wed, 31 May 2017 21:41:51 -0700 Subject: WifiApConfigStore: set LOHS wifi config networkId The WifiConfiguration object used to connect to a locally started LOHS needs a networkId that signals to ConnectivityService that the application wants to use the LOHS to talk to co-located devices. Bug: 62076211 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class com.android.server.wifi.WifiApConfigStoreTest Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class com.android.server.wifi.WifiServiceImplTest Test: manually tested with in-progress integration test Change-Id: Ic316250184eae0f04dc0fb83efb9710d5d65f0af --- service/java/com/android/server/wifi/WifiApConfigStore.java | 1 + 1 file changed, 1 insertion(+) (limited to 'service') 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); -- cgit v1.2.3