Show "Files" category for public storage in Storage Settings
Users can click this preference to see public storage files in external file browsers. Bug: 170918505 Test: make RunSettingsRoboTests ROBOTEST_FILTER=StorageItemPreferenceControllerTest manual Select private storage and public storage and observe UI Change-Id: If3f0d59b2ebf941d70e81e60c4c2015b80e7cf33
This commit is contained in:
@@ -248,15 +248,19 @@ public class StorageDashboardFragment extends DashboardFragment
|
||||
|
||||
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
||||
|
||||
if (mSelectedStorageEntry.isPrivate() && mSelectedStorageEntry.isMounted()) {
|
||||
if (!mSelectedStorageEntry.isMounted()) {
|
||||
// Set null volume to hide category stats.
|
||||
mPreferenceController.setVolume(null);
|
||||
return;
|
||||
}
|
||||
if (mSelectedStorageEntry.isPrivate()) {
|
||||
// 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 {
|
||||
// Set null volume to hide category stats.
|
||||
mPreferenceController.setVolume(null);
|
||||
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user