Necessary AccessPoint visibility change for WifiNetworkDetailsFragment.
Refactor constant name in WifiTracker for readability. Bug: 34713316 Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java Change-Id: I41b0d69303d0452e2c2c22bcbddc34ae3932e99e
This commit is contained in:
@@ -848,7 +848,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean update(WifiConfiguration config, WifiInfo info, NetworkInfo networkInfo) {
|
||||
public boolean update(WifiConfiguration config, WifiInfo info, NetworkInfo networkInfo) {
|
||||
boolean reorder = false;
|
||||
if (info != null && isInfoForThisAccessPoint(config, info)) {
|
||||
reorder = (mInfo == null);
|
||||
|
||||
@@ -471,7 +471,8 @@ public class WifiTracker {
|
||||
accessPoint.update(connectionConfig, mLastInfo, mLastNetworkInfo);
|
||||
}
|
||||
if (mIncludeSaved) {
|
||||
// If saved network not present in scan result then set its Rssi to MAX_VALUE
|
||||
// If saved network not present in scan result then set its Rssi to
|
||||
// UNREACHABLE_RSSI
|
||||
boolean apFound = false;
|
||||
for (ScanResult result : results) {
|
||||
if (result.SSID.equals(accessPoint.getSsidStr())) {
|
||||
@@ -480,7 +481,7 @@ public class WifiTracker {
|
||||
}
|
||||
}
|
||||
if (!apFound) {
|
||||
accessPoint.setRssi(Integer.MAX_VALUE);
|
||||
accessPoint.setRssi(AccessPoint.UNREACHABLE_RSSI);
|
||||
}
|
||||
accessPoints.add(accessPoint);
|
||||
apMap.put(accessPoint.getSsidStr(), accessPoint);
|
||||
|
||||
Reference in New Issue
Block a user