Merge "Handle public volumes and otherwise invalid UUIDs." into pi-dev

am: ee1661f7cd

Change-Id: Ibaed0d6289ce9312f2acc2701cea9cee90740492
This commit is contained in:
Jeff Sharkey
2018-03-30 10:31:32 +00:00
committed by android-build-merger

View File

@@ -756,10 +756,15 @@ public class StorageManager {
}
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) {