diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index 1dff63807..1d23cc350 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -1527,9 +1527,12 @@ public class WifiMetrics { for (ScanDetail scanDetail : scanDetails) { NetworkDetail networkDetail = scanDetail.getNetworkDetail(); ScanResult scanResult = scanDetail.getScanResult(); - if (mWifiNetworkSelector.isSignalTooWeak(scanResult)) { - continue; + + // statistics to be collected for ALL APs (irrespective of signal power) + if (networkDetail.is80211McResponderSupport()) { + supporting80211mcAps++; } + ScanResultMatchInfo matchInfo = ScanResultMatchInfo.fromScanResult(scanResult); Pair<PasspointProvider, PasspointMatch> providerMatch = null; PasspointProvider passpointProvider = null; @@ -1568,6 +1571,13 @@ public class WifiMetrics { } } + + if (mWifiNetworkSelector.isSignalTooWeak(scanResult)) { + continue; + } + + // statistics to be collected ONLY for those APs with sufficient signal power + ssids.add(matchInfo); bssids++; boolean isOpen = matchInfo.networkType == ScanResultMatchInfo.NETWORK_TYPE_OPEN; @@ -1592,9 +1602,6 @@ public class WifiMetrics { savedPasspointProviderProfiles.add(passpointProvider); savedPasspointProviderBssids++; } - if (networkDetail.is80211McResponderSupport()) { - supporting80211mcAps++; - } } mWifiLogProto.fullBandAllSingleScanListenerResults++; incrementTotalScanSsids(mTotalSsidsInScanHistogram, ssids.size()); |