summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
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