summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-05-15 08:49:17 -0700
committerRoshan Pius <rpius@google.com>2019-05-15 09:06:20 -0700
commitea508d5b0512a2056ed02b82c56b987917665f43 (patch)
tree865044556cd6c4f14ea525cc830848158889ed1b
parent81468eeebdf860cce461ed595725598bc608cadb (diff)
ClentModeImpl: Reset networkspecifier on agent
Reset the MatchAllNetworkSpecifier from the capabilities copied over to the WifiNetworkAgent from the WifiNetworkFactory. MatchAllNetworkSpecifier should only be used for NetworkFactory filters. Note: This does not fix the underlying issue of why we connected to a network not existing in our database. Bug: 132341721 Test: Device connects to wifi networks. Test: atest com.android.server.wifi Change-Id: Ic40506510335655cc94c5765c5d4ee948edfdcac
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index c0ff441a7..a2392e526 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -4650,6 +4650,9 @@ public class ClientModeImpl extends StateMachine {
private NetworkCapabilities getCapabilities(WifiConfiguration currentWifiConfiguration) {
final NetworkCapabilities result = new NetworkCapabilities(mNetworkCapabilitiesFilter);
+ // MatchAllNetworkSpecifier set in the mNetworkCapabilitiesFilter should never be set in the
+ // agent's specifier.
+ result.setNetworkSpecifier(null);
if (currentWifiConfiguration == null) {
return result;
}