Only display RSSI/band information if network is connected.

Change the verbose AccessPoint summary to only display visibility summary
if it is the currently connected network.

Note: This does not fix the underlying behavioral issue where
WifiTracker does not correctly null out the AccessPoint's mWifiInfo.

Bug: 62317380
Test: manual

Change-Id: Idcdd182200d2d2ded6b3200b67c4ed654d45a9b7
(cherry picked from commit 3c4f4ffc5c)
This commit is contained in:
Eric Schwarzenbach
2017-07-18 15:05:44 -07:00
parent 74f09cff14
commit b77d3d7475

View File

@@ -764,7 +764,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
if (WifiTracker.sVerboseLogging) {
// Add RSSI/band information for this config, what was seen up to 6 seconds ago
// verbose WiFi Logging is only turned on thru developers settings
if (mInfo != null && mNetworkInfo != null) { // This is the active connection
if (isActive() && mInfo != null) {
summary.append(" f=" + Integer.toString(mInfo.getFrequency()));
}
summary.append(" " + getVisibilityStatus());
@@ -826,7 +826,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
long now = System.currentTimeMillis();
if (mInfo != null) {
if (isActive() && mInfo != null) {
bssid = mInfo.getBSSID();
if (bssid != null) {
visibility.append(" ").append(bssid);