diff options
author | Nate Jiang <qiangjiang@google.com> | 2020-05-29 05:50:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-29 05:50:49 +0000 |
commit | 81a23e98eb44199ac1bb7a77be2372d544b8a0ab (patch) | |
tree | 86c722117927cbe1a4f05f32290aa3e665776dc8 /service | |
parent | 05c32ca28760a70aca744e93c72bf9e34aa1f883 (diff) | |
parent | 07ac7b74013417eba3ac212997f979d5272e658c (diff) |
Merge "[Metrics] Add metric for BSSID different between framework and FW" into rvc-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 4 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 9 | ||||
-rw-r--r-- | service/proto/src/metrics.proto | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 0f84b3dd9..727676880 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -2983,6 +2983,10 @@ public class ClientModeImpl extends StateMachine { mNetworkFactory.handleConnectionAttemptEnded(level2FailureCode, configuration); mWifiNetworkSuggestionsManager.handleConnectionAttemptEnded( level2FailureCode, configuration, getCurrentBSSID()); + ScanResult candidate = configuration.getNetworkSelectionStatus().getCandidate(); + if (candidate != null && !TextUtils.equals(candidate.BSSID, getCurrentBSSID())) { + mWifiMetrics.incrementNumBssidDifferentSelectionBetweenFrameworkAndFirmware(); + } } handleConnectionAttemptEndForDiagnostics(level2FailureCode); } diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index 621a2fbc8..0559326b1 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -6452,4 +6452,13 @@ public class WifiMetrics { public void noteSoftApClientBlocked(int maxClient) { mSoftApConfigLimitationMetrics.maxClientSettingWhenReachHistogram.increment(maxClient); } + + /** + * Increment number of connection with different BSSID between framework and firmware selection. + */ + public void incrementNumBssidDifferentSelectionBetweenFrameworkAndFirmware() { + synchronized (mLock) { + mWifiLogProto.numBssidDifferentSelectionBetweenFrameworkAndFirmware++; + } + } } diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto index 0c3346bef..8755271f7 100644 --- a/service/proto/src/metrics.proto +++ b/service/proto/src/metrics.proto @@ -706,6 +706,9 @@ message WifiLog { // User reaction to the carrier or suggestion app approval UI. optional UserReactionToApprovalUiEvent user_reaction_to_approval_ui_event = 198; + + // Number of connection with different BSSID between framework and firmware selection. + optional int32 num_bssid_different_selection_between_framework_and_firmware = 199; } // Information that gets logged for every WiFi connection. |