Public volumes have short UUIDs (which aren't valid 128-bit UUIDs),
so we can't pass them around. Even if they were valid UUIDs, we
don't handle clearing cached data on them, and they most likely
don't support fallocate(), so don't match them.
Test: manual
Bug:
74132243
Change-Id: Ib855eb869a86392e96ced94a9926c0b32b87e57e
}
try {
for (VolumeInfo vol : mStorageManager.getVolumes(0)) {
- if (vol.path != null && FileUtils.contains(vol.path, pathString)) {
+ if (vol.path != null && FileUtils.contains(vol.path, pathString)
+ && vol.type != VolumeInfo.TYPE_PUBLIC) {
// TODO: verify that emulated adopted devices have UUID of
// underlying volume
- return convert(vol.fsUuid);
+ try {
+ return convert(vol.fsUuid);
+ } catch (IllegalArgumentException e) {
+ continue;
+ }
}
}
} catch (RemoteException e) {