diff options
author | Etan Cohen <etancohen@google.com> | 2018-03-27 12:51:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-03-27 12:51:20 +0000 |
commit | c77b30e7e1c797601af053548202648a1b5cb74a (patch) | |
tree | 6ce1e066bc1b9139122e29c08d32fa757043b3ef /service | |
parent | e263554266052ba1ae06a97867a5d65ffd9297b2 (diff) | |
parent | 973e49552e5536a5accc391f7760aaafa694df6f (diff) |
Merge "[RTT] Collect metrics on observed IEEE 802.11mc supporting APs" into pi-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index d39eb4e59..cfc30badc 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -96,6 +96,7 @@ public class WifiMetrics { public static final int MAX_TOTAL_PASSPOINT_APS_BUCKET = 50; public static final int MAX_TOTAL_PASSPOINT_UNIQUE_ESS_BUCKET = 20; public static final int MAX_PASSPOINT_APS_PER_UNIQUE_ESS_BUCKET = 50; + public static final int MAX_TOTAL_80211MC_APS_BUCKET = 20; private static final int CONNECT_TO_NETWORK_NOTIFICATION_ACTION_KEY_MULTIPLIER = 1000; // Max limit for number of soft AP related events, extra events will be dropped. private static final int MAX_NUM_SOFT_AP_EVENTS = 256; @@ -187,6 +188,8 @@ public class WifiMetrics { private final SparseIntArray mObservedHotspotR1ApsPerEssInScanHistogram = new SparseIntArray(); private final SparseIntArray mObservedHotspotR2ApsPerEssInScanHistogram = new SparseIntArray(); + private final SparseIntArray mObserved80211mcApInScanHistogram = new SparseIntArray(); + /** Wifi power metrics*/ private WifiPowerMetrics mWifiPowerMetrics = new WifiPowerMetrics(); @@ -1442,6 +1445,7 @@ public class WifiMetrics { int passpointR2Aps = 0; Map<ANQPNetworkKey, Integer> passpointR1UniqueEss = new HashMap<>(); Map<ANQPNetworkKey, Integer> passpointR2UniqueEss = new HashMap<>(); + int supporting80211mcAps = 0; for (ScanDetail scanDetail : scanDetails) { NetworkDetail networkDetail = scanDetail.getNetworkDetail(); ScanResult scanResult = scanDetail.getScanResult(); @@ -1510,6 +1514,9 @@ public class WifiMetrics { savedPasspointProviderProfiles.add(passpointProvider); savedPasspointProviderBssids++; } + if (networkDetail.is80211McResponderSupport()) { + supporting80211mcAps++; + } } mWifiLogProto.fullBandAllSingleScanListenerResults++; incrementTotalScanSsids(mTotalSsidsInScanHistogram, ssids.size()); @@ -1537,6 +1544,7 @@ public class WifiMetrics { for (Integer count : passpointR2UniqueEss.values()) { incrementPasspointPerUniqueEss(mObservedHotspotR2ApsPerEssInScanHistogram, count); } + increment80211mcAps(mObserved80211mcApInScanHistogram, supporting80211mcAps); } } @@ -1874,6 +1882,9 @@ public class WifiMetrics { pw.println("mWifiLogProto.observedHotspotR2ApsPerEssInScanHistogram=" + mObservedHotspotR2ApsPerEssInScanHistogram); + pw.println("mWifiLogProto.observed80211mcSupportingApsInScanHistogram" + + mObserved80211mcApInScanHistogram); + pw.println("mSoftApTetheredEvents:"); for (SoftApConnectedClientsEvent event : mSoftApEventListTethered) { StringBuilder eventLine = new StringBuilder(); @@ -2187,6 +2198,9 @@ public class WifiMetrics { makeNumConnectableNetworksBucketArray( mObservedHotspotR2ApsPerEssInScanHistogram); + mWifiLogProto.observed80211McSupportingApsInScanHistogram = + makeNumConnectableNetworksBucketArray(mObserved80211mcApInScanHistogram); + if (mSoftApEventListTethered.size() > 0) { mWifiLogProto.softApConnectedClientsEventsTethered = mSoftApEventListTethered.toArray( @@ -2265,6 +2279,7 @@ public class WifiMetrics { mSoftApEventListLocalOnly.clear(); mWpsMetrics.clear(); mWifiWakeMetrics.clear(); + mObserved80211mcApInScanHistogram.clear(); } } @@ -2687,6 +2702,9 @@ public class WifiMetrics { private void incrementPasspointPerUniqueEss(SparseIntArray sia, int element) { increment(sia, Math.min(element, MAX_PASSPOINT_APS_PER_UNIQUE_ESS_BUCKET)); } + private void increment80211mcAps(SparseIntArray sia, int element) { + increment(sia, Math.min(element, MAX_TOTAL_80211MC_APS_BUCKET)); + } private void increment(SparseIntArray sia, int element) { int count = sia.get(element); sia.put(element, count + 1); |