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

Commit f81494a1 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Return valid path for secondary storage devices.

Bug: 122900949
Test: manual
Change-Id: I3ce5ca49720dc1854dd5207d29f59fa85821f23e
parent 4a2aeaf8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2947,7 +2947,9 @@ public final class MediaStore {
        for (VolumeInfo vi : sm.getVolumes()) {
            if (Objects.equals(vi.getFsUuid(), volumeName)) {
                final File path = vi.getPathForUser(UserHandle.myUserId());
                if (path == null) {
                if (path != null) {
                    return path;
                } else {
                    throw new FileNotFoundException("Failed to find path for " + vi);
                }
            }