Commit Graph

14 Commits

Author SHA1 Message Date
Salvador Martinez
cbefbc261f Add info string to advanced battery usage page
This CL adds an FYI string under the battery graph to let users
know that their current estimate is coming from the enhanced
estimate provider when it is enabled.

Test: Robotests
Bug: 38399654
Change-Id: If5cd622ef0251a5a483cef870fc2261369e14845
2017-06-20 18:37:49 -07:00
TreeHugger Robot
b424cf771b Merge "Refactor anomaly detection" 2017-06-06 19:44:19 +00:00
jackqdyulei
e3e8bd6317 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
2017-06-05 19:35:22 -07:00
Salvador Martinez
f4727ea07f Add ability to see both battery estimates on long press
If the enhanced estimate is being used in battery settings
it is now possible to long press on the text to have it display
both instead of the string that is normally used.

Adds another loader to enable this since it needs both the old
and the new estimates simultaneously.

Feature is hidden behind a feature flag that only googlers will
have enabled.

Test: robotests
Bug: 38399275
Change-Id: I5caf26513baada27efd50ddb0e72d3868da47150
2017-06-05 16:26:32 -07:00
jackqdyulei
0dce3c0764 Add framework for anomaly detection flags
This cl adds isAnomalyDetectorEnabled(type), which decides whether
to turn on specific check with that type.

Added method is used in AnomalyLoader.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I71c6acb1c58c24453a1936c5c36f59fe4e86cfd4
2017-05-08 14:19:09 -07:00
Salvador Martinez
126c032afa Add ability to speak to provider for enhanced estimate
Added code that checks if the provider for the enhanced battery
drain estimate is available. If it is available we use that
value instead of the one computed by BatteryStats.

Test: Robotests
Bug: 37753227
Change-Id: I7eae01b56f85d33eafc42ee0f18bb752779581b2
2017-05-04 20:05:53 -07:00
jackqdyulei
d1a1fede6f Add method to check whether to enable anomaly detection
Bug: 37709022
Test: RunSettingsGoogleRoboTests
Change-Id: Ie95b8899f0201d392ba06e4747a0d926d7474d68
2017-04-26 10:48:05 -07:00
jackqdyulei
238c1c000b Add batterysipper type check in PowerUsageFeatureProvider
This cl adds isTypeSystem to PowerUsageFeatureProvider and
changes isTypeService. After this cl, the following items will
be moved to advanced battery page:
1. Calendar Storage(Move to System)
2. MediaServer(Move to System)

Create this check in FeatureProvider to make sure this check
is flexible in different cases. Also refactor the PowerUsageSummary
to use same test fragment

Bug: 35629871
Bug: 35628690
Bug: 35317876
Test: RunSettingsRoboTest
Change-Id: I8c083cb2557a7e900aea01e682c13a000bacb7a9
2017-02-27 19:42:22 -08:00
jackqdyulei
5115265a50 Add toggle in menu to show/hide hidden apps
In the previous cl we hide unrelated apps and distribute hidden
battery usage among other apps. Now we add a toggle in menu to
show old power accounting as well.

Bug: 35366708
Test: RunSettingsRoboTests
Change-Id: I6918b7095cf84d9756ad3972ff50a62aeae1de0e
2017-02-21 16:00:20 -08:00
jackqdyulei
acc195fdde Add type service in settings advanced page.
Currently it only includes the gms service

Bug: 35317876
Test: RunSettingsRoboTests
Change-Id: I20a2a9d320efe4aed036552d450f59c89e81584a
2017-02-17 15:17:31 -08:00
jackqdyulei
a224b010b9 Create Advanced battery page
The advanced page shows two major parts, one is the battery usage
graph and the other is battery usage list. In usage list, each item
shows basic info of battery usage of one type(e.g. Apps, System)

Bug: 34385770
Test: RunSettingsRoboTests

Change-Id: I22475a489285787afa775af8d5ae3340eff1eed9
2017-02-06 13:44:59 -08:00
Jaewoong Jung
6a43a06cac Implements additional battery info menu behavior.
Bug: 33352540
Test: Updated existing tests.
Change-Id: I990029d2ea9032301362d614959259965b8ecb10
2016-12-20 19:17:16 -08:00
Jaewoong Jung
1e0f8ff5e5 Adds a menu item for additional battery info to battery settings.
Bug: 33352540
Test: No additional test failures.

Change-Id: Ibfc1a9463c93d3c087ed712fe45d3d0717472c6a
2016-12-16 12:25:32 -08:00
jackqdyulei
348bcc1e81 Add the interface to check the status of location setting.
Bug: 30790766
Test: ag/1346969

Change-Id: Id6de284ba90f75015372dbe28805bdc0d94a0723
2016-08-31 12:54:17 -07:00