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
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.