Commit Graph

14 Commits

Author SHA1 Message Date
ykhung
4280a7f897 Refine the interpolation rule and clip the usage time data
Bug: 184807417
Test: make SettingsRoboTests
Change-Id: I6c115beed34abd393e5c615cc59d3c4c323dfa0b
2021-05-07 16:36:56 +08:00
ykhung
f76ba1189a Adopt new battery history map with interpolation method
Bug: 184807417
Test: make SettingsRoboTests
Change-Id: I5c45a443d0a72df352d4bb707412328ad009f6d4
2021-05-07 00:25:33 +08:00
ykhung
973212adf7 Rename variables and refine the format style from ag/14346184
Bug: 14346184
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie87f2dba2b87781ed5071adbc6f8a2aa45d1fd53
2021-05-04 11:59:07 +08:00
Dmitri Plotnikov
6417493b29 Replace uses of SystemBatteryConsumer with aggregate BatteryConsumers
Bug: 186006876
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: I2e240aa15c87b4b9dcbe993b4b0b1111285ec3ff
2021-05-03 11:01:36 -07:00
ykhung
0c7e50cb43 Add new field for data interpolation usage
reference the decription in cl/371645876

Bug: 184807417
Test: make SettingsRoboTests
Change-Id: I944399dc205cad9b96fe22e82e4c651b4ccc4e37
2021-05-03 18:31:27 +08:00
ykhung
41fd8a7494 Refresh category title by different time slot condition
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ib124e1cfb9549f838540ff547bc616049f65180d
2021-04-25 07:47:31 +00:00
ykhung
ef6cea8c84 Add test cases for utcToLocalTime in the ConvertUtils
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I22bda2db821e69c40202db692ada52e96af25e16
2021-04-24 13:41:45 +08:00
ykhung
3cdf60c016 Purge low percentage BatteryDiffEntry from indexed usage map
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I943e224147ccbfa80578511d6cb0d6adf6f8da0f
2021-04-17 10:22:11 +00:00
ykhung
ab5e180139 Refine logic and add simple test for BatteryChartPreferenceController
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie218cf967c6f30c6eadcdfe6bfd3f37ccdc2276e
2021-04-16 07:02:04 +00:00
ykhung
db88c994b4 Load application icon and label from package manager if available
Bug: 185187669
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Id612f0f1db51d538abb41fc711b9350d9a147cb8
2021-04-13 23:12:12 +08:00
ykhung
0d54b75b2c Inserts last 24 hour agrregate data into indexed usage map
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I7771a43baf74b36a816883dd6b6a91128f827cf4
2021-04-13 11:59:28 +08:00
ykhung
aeb5b95705 Add a method to calculate battery usage diff results from history
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: If613c5cfd7e00e1883107385d3d8552774378cd7
2021-04-13 00:25:17 +08:00
ykhung
bdaee1431f Send fake data if there is no battey consumption entry list
Sends fake data into SettingsIntelligence if there is no data in the
battery consumption list, otherwise we don't have battery level data to
draw into the chart graph. We should draw the battery levels if it is
full-charged without any BatteryEntry data.

Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I759e769256f4aa0ec152afff5c265ee3d04c03da
2021-04-11 22:54:27 +08:00
ykhung
b350c66d97 Move the battery components from SettingsGoogle to Settings
Bug: 183921876
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I47cbba1cbfd6cb17745e7aaaf56b22e3c9dcd30e
2021-04-07 12:09:54 +08:00