summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2018-04-13 16:51:20 -0700
committerEtan Cohen <etancohen@google.com>2018-04-13 16:51:20 -0700
commit533e7436021769b3582a230b0622fd44bfcc7cf2 (patch)
treeef0c69f181b7b4f61feee0a41f55b6ace0e9ebbe /service
parentab333b53b25ed719359444c8dc9b2230ffebc34c (diff)
[WIFI][METRICS] Update Passpoint and RTT metrics collection criteria
The Wi-Fi Metrics module collects information on observed APs which support Passpoint (R1 and R2) and IEEE 802.11mc (RTT). This metrics collection was added to code which gated metrics collection only for APs with strong signal. Update the collection point to always collect metrics for passpoint and RTT - irrespective of AP signal strength. Bug: 76416162 Test: runtests.sh -e class com.android.server.wifi.WifiMetricsTest Change-Id: I29d69218efd9f82e8d42067b93bf3c6910699c74
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiMetrics.java17
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());