summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorChalard Jean <jchalard@google.com>2018-05-08 17:16:57 +0900
committerChalard Jean <jchalard@google.com>2018-05-09 17:13:43 +0900
commit27991984fa79c0a1656df9d63cae951bbdb74ad1 (patch)
treedbf17af5c11bf6c3c6250f6856430c8fd2f47caf /service
parent76defeec19f5f0155a657bedc7590edd8c455d1d (diff)
Make the SSID known to ConnectivityService immediately.
This will help ConnectivityService with more helpful logging. Bug: 78547904 Test: manual Change-Id: Ic915796f401a72c5577153cad16b55e8e096d8b0
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 4a0a24a21..fe3aa94ae 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -4740,9 +4740,15 @@ public class WifiStateMachine extends StateMachine {
}
setNetworkDetailedState(DetailedState.CONNECTING);
+ final NetworkCapabilities nc;
+ if (mWifiInfo != null && !mWifiInfo.getSSID().equals(WifiSsid.NONE)) {
+ nc = new NetworkCapabilities(mNetworkCapabilitiesFilter);
+ nc.setSSID(mWifiInfo.getSSID());
+ } else {
+ nc = mNetworkCapabilitiesFilter;
+ }
mNetworkAgent = new WifiNetworkAgent(getHandler().getLooper(), mContext,
- "WifiNetworkAgent", mNetworkInfo, mNetworkCapabilitiesFilter,
- mLinkProperties, 60, mNetworkMisc);
+ "WifiNetworkAgent", mNetworkInfo, nc, mLinkProperties, 60, mNetworkMisc);
// We must clear the config BSSID, as the wifi chipset may decide to roam
// from this point on and having the BSSID specified in the network block would