diff options
author | Mingguang Xu <mingguangxu@google.com> | 2019-04-23 05:59:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-04-23 05:59:50 +0000 |
commit | 26baf9944cf023afe8dfba6d0e7619b57f6d1c79 (patch) | |
tree | 2b4747abe9fbf9f7786e30b6e143468489ac33e5 /service | |
parent | 773ebaf049a110adc4751eef9a2a100f5a54e3c6 (diff) | |
parent | 094ab86334602dd5402f371b0b7e71746df7a476 (diff) |
Merge "Wifi usability: Check screen status before adding bad Wifi usability stats" into qt-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index ffe76afe9..70aaaaf43 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -2245,10 +2245,8 @@ public class WifiMetrics { public void logFirmwareAlert(int errorCode) { incrementAlertReasonCount(errorCode); logWifiIsUnusableEvent(WifiIsUnusableEvent.TYPE_FIRMWARE_ALERT, errorCode); - if (mScreenOn) { - addToWifiUsabilityStatsList(WifiUsabilityStats.LABEL_BAD, - WifiUsabilityStats.TYPE_FIRMWARE_ALERT, errorCode); - } + addToWifiUsabilityStatsList(WifiUsabilityStats.LABEL_BAD, + WifiUsabilityStats.TYPE_FIRMWARE_ALERT, errorCode); } public static final String PROTO_DUMP_ARG = "wifiMetricsProto"; @@ -4456,7 +4454,7 @@ public class WifiMetrics { */ public void addToWifiUsabilityStatsList(int label, int triggerType, int firmwareAlertCode) { synchronized (mLock) { - if (mWifiUsabilityStatsEntriesList.isEmpty()) { + if (mWifiUsabilityStatsEntriesList.isEmpty() || !mScreenOn) { return; } if (label == WifiUsabilityStats.LABEL_GOOD) { |