diff options
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) { |