OSDN Git Service

Framework for the anomaly detection.
authorjackqdyulei <jackqdyulei@google.com>
Tue, 25 Apr 2017 18:30:06 +0000 (11:30 -0700)
committerjackqdyulei <jackqdyulei@google.com>
Mon, 1 May 2017 23:03:09 +0000 (16:03 -0700)
commitdf6dd14799e7116bef9231acd1f5d21bdd0e99cd
tree2d084e44dfda5b0cfff6ec8cdf4a4c5878da90a1
parent4869effb72337b9dc3b9d9a980b5170001c4a976
Framework for the anomaly detection.

This cl adds the following components for anomaly dection:
1. AnomalyLoader: run all the anomaly checks in the background
2. Anomaly: Data class to represent what anomaly it is
3. Detector: Different kinds of anomaly detector with common interface
4. Action:  Suggestions when facing anomaly(Force stop, uninstall)
5. AnomalyDialogFragment: show the confirm dialog for action
6. AnomalyPreferenceController: handle update and click for
anomalyPreference, since it will be used in multiple fragments.
7. AnomalyUtils: utility class for anomaly

This cl also adds skeleton for the wakelock check and action. Following
cls will add real implementation about it.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I89fc4b6963757869b93791b4275ca53c04ab9604
15 files changed:
res/xml/power_usage_summary.xml
src/com/android/settings/fuelgauge/PowerUsageSummary.java
src/com/android/settings/fuelgauge/anomaly/Anomaly.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragment.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/AnomalyLoader.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/AnomalyPreferenceController.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/AnomalyUtils.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/action/AnomalyAction.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/action/ForceStopAction.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/checker/AnomalyDetector.java [new file with mode: 0644]
src/com/android/settings/fuelgauge/anomaly/checker/WakeLockAnomalyDetector.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragmentTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/fuelgauge/anomaly/AnomalyPreferenceControllerTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/fuelgauge/anomaly/AnomalyTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/fuelgauge/anomaly/AnomalyUtilsTest.java [new file with mode: 0644]