summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorChalard Jean <jchalard@google.com>2018-05-10 05:58:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-10 05:58:24 +0000
commit80ebad276ca738aa5c395f1354ebe6db64e5ae9e (patch)
treed83ed580d5ee3e5fddf66523c4f7e18f9cbf1a0a /service
parent2c88f670aad308c91801c7bfeabbce8d78a506fe (diff)
parent27991984fa79c0a1656df9d63cae951bbdb74ad1 (diff)
Merge "Make the SSID known to ConnectivityService immediately." into pi-dev
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 bca20e43d..9dea956f2 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -4714,9 +4714,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