Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e827123c authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

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

am: b4073892

Change-Id: I5f11191b063ab17e6d5a3a9edf6cc8cf34272638
parents 493ca5a2 b4073892
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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
                    try {
                        return convert(vol.fsUuid);
                    } catch (IllegalArgumentException e) {
                        continue;
                    }
                }
            }
        } catch (RemoteException e) {