From ffc474dc21b6120c732cf5f3b1900425a5c08d9e Mon Sep 17 00:00:00 2001 From: Stephen Chen Date: Tue, 25 Jul 2017 17:16:18 -0700 Subject: WifiNetworkSelector: Use ScanResultUtil to filter for open networks. Bug: 63999197 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I7794b0926a407e2690289d11c827ea2aaeed2e32 --- service/java/com/android/server/wifi/WifiNetworkSelector.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'service') 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; } -- cgit v1.2.3