From b77d3d74752fca440349269ee661c02ee07af5db Mon Sep 17 00:00:00 2001 From: Eric Schwarzenbach Date: Tue, 18 Jul 2017 15:05:44 -0700 Subject: 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 3c4f4ffc5c26981020942397fe54c53f551ea7ca) --- .../SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index 01d901496125..f2898c9ca705 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -764,7 +764,7 @@ public class AccessPoint implements Comparable { 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 { long now = System.currentTimeMillis(); - if (mInfo != null) { + if (isActive() && mInfo != null) { bssid = mInfo.getBSSID(); if (bssid != null) { visibility.append(" ").append(bssid); -- cgit v1.2.3-59-g8ed1b