summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Chen <stewchen@google.com>2017-07-25 17:16:18 -0700
committerStephen Chen <stewchen@google.com>2017-07-25 17:16:18 -0700
commitffc474dc21b6120c732cf5f3b1900425a5c08d9e (patch)
tree483064b5ac5ecb9df00f6471eddf582b91af853f
parent425676edcb8853bd5aff996a0be6974b06246e46 (diff)
WifiNetworkSelector: Use ScanResultUtil to filter for open networks.
Bug: 63999197 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I7794b0926a407e2690289d11c827ea2aaeed2e32
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkSelector.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java
index 5e9e4ef01..4c1df200a 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSelector.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java
@@ -30,6 +30,7 @@ import android.util.Pair;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wifi.util.ScanResultUtil;
import java.util.ArrayList;
import java.util.HashSet;
@@ -340,9 +341,7 @@ public class WifiNetworkSelector {
for (ScanDetail scanDetail : mFilteredNetworks) {
ScanResult scanResult = scanDetail.getScanResult();
- // A capability of [ESS] represents an open access point
- // that is available for an STA to connect
- if (scanResult.capabilities == null || !scanResult.capabilities.equals("[ESS]")) {
+ if (!ScanResultUtil.isScanResultForOpenNetwork(scanResult)) {
continue;
}