There was an infinite loop that could occur in BatterySaverUtils what was caused by battery saver utils updating the battery estimate which then told the page to check for an estimate and then it would repeat from there. This cleans up the logic in that loop slightly to prevent it from refreshing more than is necessary. Test: atest BatteryUtilsTest Bug: 132751712 Change-Id: I918484747ecd9735315570ad608489e0f61d7578
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.