diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-24 20:20:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-24 20:21:05 +0000 |
commit | 78156cd914c78f7bd427b85d4b5ebf338d8166c3 (patch) | |
tree | 561f6efcd2e7fc6d56eb8f763b6700b6217eba1c /service | |
parent | 42e4920fdc3ad70f437f7a5967169b06116f1c62 (diff) | |
parent | 2a0ad34fff0956b85afa702617a3322ca85c3dca (diff) |
Merge "WifiMetrics: Add methods to increment new hal/cond metrics" into oc-dev
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)); |