Storage Settings hides categories when loading

To hide sorting animation.

- Storage Settings always loads cache and updates UI, then
  loads storage size and updates UI.
  Remove the chche design because storage category preferences
  will hide during loading, it no meaning to load from cache
  and update UI.

- Hides loading circle before storage category preferences
  become visible, it prevents flickers.

- Remove Calculating... summary of StorageItemPreference.

- Private storage category preferences and secondary user
  preference become visible at
  StorageItemPreferenceController#onLoadFinished.

Bug: 188731179
Bug: 185547228
Bug: 188615591
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
Change-Id: I3ebef5829ef4f806add07f58fa02520804768be5
This commit is contained in:
Arc Wang
2021-05-31 11:50:22 +08:00
parent 3940e5293c
commit 51b3e7a093
11 changed files with 95 additions and 649 deletions

View File

@@ -43,7 +43,6 @@ public class StorageItemPreference extends Preference {
public StorageItemPreference(Context context, AttributeSet attrs) {
super(context, attrs);
setLayoutResource(R.layout.storage_item);
setSummary(R.string.memory_calculating_size);
}
public void setStorageSize(long size, long total) {