Showing a usage graph before end of statistic would lead to incorrect height of usage graph, and another update would lead to layout moved a little bit. This change tries to improve it through: 1. Start the loading animation earlier, and stop animation when statistics loaded. (Only effective when UI re-create.) 2. Update the UI only when statistics are ready. Bug: 187019210 Test: robotest ChartDataUsagePreferenceTest DataUsageListTest Change-Id: Ic83f2422b6c6d55948110d652ee24234f43b6445
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.