Fix calculation of Access Point Level.

Bug: b/35854026
Test: make RunSettingsRoboTests
Change-Id: I5287e8c7b46a463cfa25659c756f6ca9175cb68c
This commit is contained in:
Sundeep Ghuman
2017-03-13 15:52:40 -07:00
parent 07db40434b
commit 8f060d7148
2 changed files with 2 additions and 1 deletions

View File

@@ -319,6 +319,7 @@
<!-- Match this with drawable.wifi_signal. --> <skip /> <!-- Match this with drawable.wifi_signal. --> <skip />
<!-- Wi-Fi settings. The signal strength a Wi-Fi network has. --> <!-- Wi-Fi settings. The signal strength a Wi-Fi network has. -->
<string-array name="wifi_signal"> <string-array name="wifi_signal">
<item>Poor</item>
<item>Poor</item> <item>Poor</item>
<item>Fair</item> <item>Fair</item>
<item>Good</item> <item>Good</item>

View File

@@ -642,7 +642,7 @@ public class WifiSettings extends RestrictedSettingsFragment
for (; index < numAccessPointsToShow; index++) { for (; index < numAccessPointsToShow; index++) {
AccessPoint accessPoint = accessPoints.get(index); AccessPoint accessPoint = accessPoints.get(index);
// Ignore access points that are out of range. // Ignore access points that are out of range.
if (accessPoint.getLevel() != -1) { if (accessPoint.isReachable()) {
String key = accessPoint.getBssid(); String key = accessPoint.getBssid();
if (TextUtils.isEmpty(key)) { if (TextUtils.isEmpty(key)) {
key = accessPoint.getSsidStr(); key = accessPoint.getSsidStr();