Loading core/java/android/os/storage/StorageManager.java +1 −8 Original line number Diff line number Diff line Loading @@ -876,14 +876,7 @@ public class StorageManager { */ public @NonNull UUID getUuidForPath(@NonNull File path) throws IOException { Preconditions.checkNotNull(path); String pathString = path.getCanonicalPath(); if (path.getPath().startsWith("/sdcard")) { // On FUSE enabled devices, realpath(2) /sdcard is /mnt/user/<userid>/emulated/<userid> // as opposed to /storage/emulated/<userid>. // And vol.path below expects to match with a path starting with /storage pathString = pathString.replaceFirst("^/mnt/user/[0-9]+/", "/storage/"); } final String pathString = path.getCanonicalPath(); if (FileUtils.contains(Environment.getDataDirectory().getAbsolutePath(), pathString)) { return UUID_DEFAULT; } Loading Loading
core/java/android/os/storage/StorageManager.java +1 −8 Original line number Diff line number Diff line Loading @@ -876,14 +876,7 @@ public class StorageManager { */ public @NonNull UUID getUuidForPath(@NonNull File path) throws IOException { Preconditions.checkNotNull(path); String pathString = path.getCanonicalPath(); if (path.getPath().startsWith("/sdcard")) { // On FUSE enabled devices, realpath(2) /sdcard is /mnt/user/<userid>/emulated/<userid> // as opposed to /storage/emulated/<userid>. // And vol.path below expects to match with a path starting with /storage pathString = pathString.replaceFirst("^/mnt/user/[0-9]+/", "/storage/"); } final String pathString = path.getCanonicalPath(); if (FileUtils.contains(Environment.getDataDirectory().getAbsolutePath(), pathString)) { return UUID_DEFAULT; } Loading