Commit Graph

10 Commits

Author SHA1 Message Date
Kuan Wang
ec1c9d94f2 Remove foreground_service_usage_time_in_ms field which has been merged
into background_usage_time_in_ms in the BatteryUsageStats (b/257392992).

Test: make RunSettingsRoboTests + manual
Bug: 258124768
Bug: 253553141
Change-Id: I0967eec0cbe6d0cb7a0535d744a1046dec1d267b
2022-12-06 01:04:48 +00:00
Zhenwei Chen
2ca0fb13a3 Merge "Add dock defender battery tips" 2022-11-29 02:53:27 +00:00
Zhenwei Chen
8d11d9ceea Add dock defender battery tips
1. Remove the dock defender v1 code
2. Add dock defender battery tips and update
   corresponding list item string

Bug:256523472
Test: Unit test passed and manual test on device
Change-Id: Ib6c09df056744142f42f5e2a13252b58e54c7534
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
2022-11-28 17:45:51 +08:00
Kuan Wang
2b93d40683 Use the field isFullChargeCycleStart in database to get the last full
charge cycle start and remove the unused SharedPreference.

Test: make RunSettingsRoboTests + manual
Bug: 253553141
Change-Id: I74ef71775fa5d4871077f6d5573467aa5843bc6b
2022-11-28 11:27:24 +08:00
Kuan Wang
1493fa2fea Database restructure: use protobuf to save battery information fields.
This patch only updates the existing fields.
There will be 2 following patches to:
1. Expose the new fields (foreground / foreground service / background x
   usage time / power consumption) to UI.
2. Get the full charge cycle start time from Database and remove the
   SharedPreference.

Test: make RunSettingsRoboTests + manual
Bug: 253553141
Change-Id: Iee02dc7e671f97899cb1495323acfa0173e31df2
2022-11-17 06:06:54 +00:00
Kuan Wang
c7afa45eac Clean up unused function getHideApplicationSummary in
PowerUsageFeatureProvider.

Bug: 253395332
Bug: 254769892
Bug: 254769770
Test: make RunSettingsRoboTests
Change-Id: I6acf0cbdb7321934e85939e0acee567001107a17
2022-10-21 04:42:06 +00:00
Kuan Wang
f41ae57f17 Copy Battery Usage Database from SettingsIntelligence to Settings.
Bug: 253395332
Test: make RunSettingsRoboTests + manually
Change-Id: Ibdd2ace10d9e0893b3d96b345d563307b1890df6
2022-10-18 02:26:18 +00:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
jackqdyulei
341ad63da7 Make app predicates singleton
1. AppLabelPredicate
2. AppRestrictionPredicate

Change-Id: I1fd8611c5dd7ffa6318bcb23de7a973c111910b6
Fixes: 111323520
Test: RunSettingsRoboTests
2018-07-19 10:51:42 -07:00
Salvador Martinez
8ccb5a4698 Fix enhanced estimate discharge text showing while charging
In the PowerUsageAdvanced screen the text showing whether your time
remaining information is enhanced or not should not show when the
device is plugged in. This CL fixes a bug in that logic that would
show the text when it wasn't supposed to.

Test: robotests still pass, manual verification
Bug: 63176050
Change-Id: I33fb31671cd9c29aed20483301e51ae1ded1f1b6
2017-07-14 10:30:29 -07:00