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

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

Merge "Remove old FUSE bypass now that we have sdcardfs." into nyc-dev am: fd1bb107

am: edd2e60a

* commit 'edd2e60a':
  Remove old FUSE bypass now that we have sdcardfs.

Change-Id: Ibd1a63bd1f8ce72ea650bbd0a972314e90e3f7af
parents 8c2986a7 edd2e60a
Loading
Loading
Loading
Loading
+1 −17
Original line number Original line Diff line number Diff line
@@ -1178,23 +1178,7 @@ public class StorageManager {


    /** {@hide} */
    /** {@hide} */
    public static File maybeTranslateEmulatedPathToInternal(File path) {
    public static File maybeTranslateEmulatedPathToInternal(File path) {
        final IMountService mountService = IMountService.Stub.asInterface(
        // Disabled now that FUSE has been replaced by sdcardfs
                ServiceManager.getService("mount"));
        try {
            final VolumeInfo[] vols = mountService.getVolumes(0);
            for (VolumeInfo vol : vols) {
                if ((vol.getType() == VolumeInfo.TYPE_EMULATED
                        || vol.getType() == VolumeInfo.TYPE_PUBLIC) && vol.isMountedReadable()) {
                    final File internalPath = FileUtils.rewriteAfterRename(vol.getPath(),
                            vol.getInternalPath(), path);
                    if (internalPath != null && internalPath.exists()) {
                        return internalPath;
                    }
                }
            }
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        return path;
        return path;
    }
    }