Include user identifier in external storage paths.
When building external storage paths, always include user in path to enable cross-user paths and aid debugging. Mostly changes so Storage doesn't crash; will take another UI iteration pass soon. Bug: 7131382 Change-Id: If7ec807f12a36eb8ed02a0fb94e8a0b3a6694f16
This commit is contained in:
@@ -100,6 +100,7 @@ public class Memory extends SettingsPreferenceFragment {
|
||||
}
|
||||
|
||||
private void addCategoryForVolume(StorageVolume volume) {
|
||||
// TODO: Cluster multi-user emulated volumes into single category
|
||||
final StorageVolumePreferenceCategory category = new StorageVolumePreferenceCategory(
|
||||
getActivity(), volume);
|
||||
mCategories.add(category);
|
||||
@@ -108,9 +109,10 @@ public class Memory extends SettingsPreferenceFragment {
|
||||
}
|
||||
|
||||
private boolean isMassStorageEnabled() {
|
||||
// mass storage is enabled if primary volume supports it
|
||||
final StorageVolume[] storageVolumes = mStorageManager.getVolumeList();
|
||||
return (storageVolumes.length > 0 && storageVolumes[0].allowMassStorage());
|
||||
// Mass storage is enabled if primary volume supports it
|
||||
final StorageVolume[] volumes = mStorageManager.getVolumeList();
|
||||
final StorageVolume primary = StorageManager.getPrimaryVolume(volumes);
|
||||
return primary != null && primary.allowMassStorage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user