[ALPSxxxxxxxx] Storage view is white and cannot show any info

Storage view is white and cannot show any info while plug in/out u disk because the visibility of list view is gone.
This visibility is set when StorageDashboardFragment.java sets loading using API setLoading.
In error condition setloading was not called due to conditional statement.

After removing the conditional statement, it sets loading through which visibility of the list view is set to VISIBLE.

1. Enter Settings->Storage
2. Plug in U-disk, storage view will start updating
3. During storage view updating, plug out U-disk(before phone recognized and show U-disk)

Fix:
Bug:
Test:
Change-Id: Id7350909b614bbe9264910cab3cdeca616544618
CR-Id:
Feature:
This commit is contained in:
Ramneek Kalra
2022-05-05 17:54:07 +08:00
parent 8adb561455
commit 800152033e

View File

@@ -361,9 +361,7 @@ public class StorageDashboardFragment extends DashboardFragment
return;
}
if (getView().findViewById(R.id.loading_container).getVisibility() == View.VISIBLE) {
setLoading(false /* loading */, true /* animate */);
}
setLoading(false /* loading */, true /* animate */);
final long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes;
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());