Only show storage category stats preferences for private volumes
Hide it because there is no framework API to get storage category stats of public volumes. Bug: 174964885 Test: manual Observe storage settings UI of a USB flash drive. Change-Id: I7272cd18c186793f86548a87b5cb88bb957ff8d5
This commit is contained in:
@@ -248,13 +248,15 @@ public class StorageDashboardFragment extends DashboardFragment
|
||||
|
||||
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
||||
|
||||
if (mSelectedStorageEntry.isMounted()) {
|
||||
if (mSelectedStorageEntry.isPrivate() && mSelectedStorageEntry.isMounted()) {
|
||||
// Stats data is only available on private volumes.
|
||||
getLoaderManager().restartLoader(STORAGE_JOB_ID, Bundle.EMPTY, this);
|
||||
getLoaderManager()
|
||||
.restartLoader(VOLUME_SIZE_JOB_ID, Bundle.EMPTY, new VolumeSizeCallbacks());
|
||||
getLoaderManager().restartLoader(ICON_JOB_ID, Bundle.EMPTY, new IconLoaderCallbacks());
|
||||
} else {
|
||||
mPreferenceController.clearStorageSizeDisplay();
|
||||
// Set null volume to hide category stats.
|
||||
mPreferenceController.setVolume(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user