When users click the battery chart, the orignal behavior is that the view changes the state by itself. This cl refactors the bahavior to that the view callbacks to the controller, and the controller changes the view's state. In this way, the controller is the only source of truth of the state. This meets the controller-view model. Test: manual Bug: 239491373, 236101166 Change-Id: I754ded2dba20319f1571374dfdbef27f2420ed78
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.