From ee0920fb68d2f4447936301ce3192c345224e8e7 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Mon, 23 Apr 2018 14:13:36 -0700 Subject: WifiNetworkSelector: Networks with no internet should not be sufficient Bug: 72635747 Test: Unit tests Change-Id: If0f1599a7ad5c3963b075624d60558a7e40da432 --- service/java/com/android/server/wifi/WifiNetworkSelector.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java index 97ef221e7..883ba9301 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSelector.java +++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java @@ -179,6 +179,12 @@ public class WifiNetworkSelector { return false; } + // Network with no internet access reports is not qualified. + if (network.numNoInternetAccessReports > 0 && !network.noInternetAccessExpected) { + localLog("Current network has [" + network.numNoInternetAccessReports + + "] no-internet access reports."); + return false; + } return true; } -- cgit v1.2.3