diff options
author | Roshan Pius <rpius@google.com> | 2017-05-16 13:31:35 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2017-05-24 17:05:18 +0000 |
commit | 2a0ad34fff0956b85afa702617a3322ca85c3dca (patch) | |
tree | f8a74fed523136f04e522abff49f677dd9d9392d /service | |
parent | f9b25d48b7cadff8cb8eead96114f8b6725cc800 (diff) |
WifiMetrics: Add methods to increment new hal/cond metrics
Bug: 36586897
Test: Unit tests
Change-Id: Ic3bca30e59111923f6c7b65e8955b4d37046b2e0
(cherry picked from commit bd2cff58fca2f3d9a0cd6df8526b23f48d9d44ec)
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index bea806484..92a6fd645 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -986,6 +986,43 @@ public class WifiMetrics { } } + /** + * Increment number of times the HAL crashed. + */ + public void incrementNumHalCrashes() { + synchronized (mLock) { + mWifiLogProto.numHalCrashes++; + } + } + + /** + * Increment number of times the Wificond crashed. + */ + public void incrementNumWificondCrashes() { + synchronized (mLock) { + mWifiLogProto.numWificondCrashes++; + } + } + + /** + * Increment number of times the wifi on failed due to an error in HAL. + */ + public void incrementNumWifiOnFailureDueToHal() { + synchronized (mLock) { + mWifiLogProto.numWifiOnFailureDueToHal++; + } + } + + /** + * Increment number of times the wifi on failed due to an error in wificond. + */ + public void incrementNumWifiOnFailureDueToWificond() { + synchronized (mLock) { + mWifiLogProto.numWifiOnFailureDueToWificond++; + } + } + + public static final String PROTO_DUMP_ARG = "wifiMetricsProto"; public static final String CLEAN_DUMP_ARG = "clean"; @@ -1175,6 +1212,14 @@ public class WifiMetrics { pw.println(" FAILED_NO_CHANNEL: " + mSoftApManagerReturnCodeCounts.get( WifiMetricsProto.SoftApReturnCodeCount.SOFT_AP_FAILED_NO_CHANNEL)); pw.print("\n"); + pw.println("mWifiLogProto.numHalCrashes=" + + mWifiLogProto.numHalCrashes); + pw.println("mWifiLogProto.numWificondCrashes=" + + mWifiLogProto.numWificondCrashes); + pw.println("mWifiLogProto.numWifiOnFailureDueToHal=" + + mWifiLogProto.numWifiOnFailureDueToHal); + pw.println("mWifiLogProto.numWifiOnFailureDueToWificond=" + + mWifiLogProto.numWifiOnFailureDueToWificond); pw.println("StaEventList:"); for (StaEvent event : mStaEventList) { pw.println(staEventToString(event)); |