The injection dynamic data was loaded in the background and then post to main thread to update UI. However, it usually updates after Fragement.onResume(), which causes the flicker. To make it more smooth, DashboardFragment to wait for the dynamic data observers to update UI for a short period, which eliminates the flicker in most cases. Also skip the repeated tiles refresh called by onCategoriesChanged in onResume after all preferences refreshed. Test: robotest, visual Bug: 229177114 Change-Id: I04650af9692703f1fc1e6e5ad2090f051b1eeb81
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.