- Add Battery card that implements CustomSliceable in Contextual Settings Homepage. - Add test case for Battery slice. - Created a loadBatteryInfo method for BatterySlice. - Add a map in CustomSliceManager to cache CustomSliceable instances, let existing battery slice be able to update battery info. - Use a flag to avoid triggering an infinite loop when calling notifyChange in the callback function. Bug: 114796623, 115971399 Test: manual, robotests Change-Id: I4b785708bf8456c6c4de7cae4b44f8a060bccbae
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.