This change remove unnecessary UI dpdate of StorageItemPreferenceController. - For StorageItemPreferenceController: Remove UI update at #displayPreference since onLoadFinished will update. Don't update order at #setVolume since onLoadFinished will update. - StorageDashboardFragment & StorageCategoryFragment update StorageItemPreferenceController only when both StorageInfo and StorageResult are loaded. Bug: 185547228 Test: atest com.android.settings.deviceinfo atest com.android.settings.deviceinfo.storage make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.storage manual visual Click each file category to count files size is the same as displayed in Storage Settings. manual visual Change-Id: Id449003827a3e340e7a90f706152100b5568f834
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.