History log of /packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e063427d0b9c8e1269984100dbfb9b741ba0b61b 06-Oct-2017 Andrew Sapperstein <asapperstein@google.com> Update wakeup anomaly to exclude blacklisted wakeups.

Also disables all anomalies out of the box.

Provides the ability to ignore certain wakeups if blacklisted in
AnomalyDetectionPolicy. Compares each wakeup to the blacklist and
if it exists, does not include it in the count used to compare against
the threshold.

Change-Id: I4ef548bd0952be5f0d4e36df5698f287839d0704
Fixes: 67000019
Test: robotests
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
edfebbaa4f3ffa98c99e1e41b054853ccbff06c7 18-Jul-2017 jackqdyulei <jackqdyulei@google.com> Add log for anomaly.

This cl adds all the info that need to be logged to Anomaly and add a
dump method for log.

Bug: 63776178
Test: RunSettingsRoboTests
Change-Id: If762bfca725fee07944ffa23998332c81335a37f
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
30f903da34a2d563272858691251c6db811ca979 18-Jul-2017 jackqdyulei <jackqdyulei@google.com> Build extra data in wakeup anomaly

Wakeup Anomaly need this data to decide which action to take. The
previous cl adds it to wakelock anomaly, not wakeup anomaly.

Bug: 63777620
Test: RunSettingsRoboTests
Change-Id: I07c7252398add1573ea7de82953cbeabdbfe947d
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
bfc2b11b9357c4508756243f540760458611b3b8 29-Jun-2017 jackqdyulei <jackqdyulei@google.com> Update Anomaly detection framework

This cl make it could have multiple actions for each anomaly type.

This includes:
1. Add field "targetSdkVersion", "bgRestrictionEnabled" in Anomaly
2. Add new action which includes "force stop" and "background check"
3. Add "sdkVersion" and "bgRestrictionEnabled" method in BatteryUtils
4. Update BackgroundCheckAction to check sdkVersion first
5. Update serveral tests and add new test

Bug: 63037765
Test: RunSettingsRoboTests
Change-Id: Iea7a131ee57d501f7737ae4a3ba672d948d05cd8
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
8213f102dc49759edba272c23541adeacc155272 29-Jun-2017 jackqdyulei <jackqdyulei@google.com> Change the type of "hours" from long to double

So we won't have the rounding issue here.

Bug: 63112264
Test: RunSettingsRoboTests
Change-Id: I85b3525781074294964a956dbe76f3b55f65704d
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
ec8e127ed3a616a7ca223a5bc6d9c4bbc036cd90 15-Jun-2017 jackqdyulei <jackqdyulei@google.com> Add anomaly detector for unoptimized bt scanning

This cl detects bt anomaly by using
BluetoothUnoptimizedScanBackgroundTimer. It will report anomaly
if total duration is longer than threshold.

Future cl will hook up the threshold to server side.

Bug: 36921532
Test: RunSettingsRoboTests
Change-Id: I5d6a42b2d2c4fec94387ca59ba8e6a2f3346d047
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
9453e89aca3508dd79cc44b70b5e63d1e1feef3a 09-Jun-2017 jackqdyulei <jackqdyulei@google.com> Add action active check for anomaly action.

This cl adds the action active check for the following actions:
1. ForceStopAction: check whether app is stopped
2. BackgroundActivityAction: check whether background activity
is turned on

If related action is not active, we won't report anomaly
to users. Future cl will add active check for bluetooth anomaly.

Bug: 62452014
Test: RunSettingsRoboTests

Change-Id: Ib490227f4570accf8ca4840a99bf85a022c42a5b
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
e3e8bd6317059cf610832445ad307734bb65a87c 25-May-2017 jackqdyulei <jackqdyulei@google.com> Refactor anomaly detection

This cl refactor it so:
1. AnomayLoader could create its own BatteryStatsHelper if needed.
2. AnomalyDetector could detect the anomaly with a target package name
3. Remove FeatureProvider in AnomalyLoader and use
AnomalyDetectionPolicy instead

With this cl, we could add anomaly detection to battery usage page
more easily.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I1ee09701de8b5c8855f44e447813760285794c89
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
fa4939bbc931221a0687b78c6f592a080833a5d3 23-May-2017 jackqdyulei <jackqdyulei@google.com> Add flag for wakeup alarm

Also hook up it to WakeupAlarmAnomalyDetector

Bug: 38233931
Test: RunSettingsRoboTests
Change-Id: Iceae37dcd2e6a6f1a044fa36efb416f11703c431
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java
495de548bde360a7005f46f6db85f28742f42271 18-May-2017 jackqdyulei <jackqdyulei@google.com> Add wakeup alarm anomaly detector

Wakeup alarm count frequent is calculated by a / b, where
1. a: the total wakeup alarm count since the last full charge
2. b: total time running since last full charge
(include sleeping time)

This cl also has the following changes:
1. Move bunch of methods to BatteryUtils
2. Create type WAKEUP_ALARM
3. Add and update tests

Upcoming cl will make sure we get the threshold from
AnomalyDetectionPolicy

Bug: 36921529
Test: RunSettingsRoboTests
Change-Id: I4f7b85606df68b6057f6c7d3f3be7f9a9a747f1d
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/WakeupAlarmAnomalyDetector.java