OSDN Git Service

Merge "Remove old FUSE bypass now that we have sdcardfs." into oc-dev
authorJeff Sharkey <jsharkey@google.com>
Wed, 7 Jun 2017 19:12:59 +0000 (19:12 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 7 Jun 2017 19:12:59 +0000 (19:12 +0000)
am: 6746aa8c4d

Change-Id: I6b78fba341499617e279b38f2e1885cd58551b0d

core/java/android/os/storage/StorageManager.java

index a6cdb03..5046735 100644 (file)
@@ -1403,23 +1403,7 @@ public class StorageManager {
 
     /** {@hide} */
     public static File maybeTranslateEmulatedPathToInternal(File path) {
-        final IStorageManager storageManager = IStorageManager.Stub.asInterface(
-                ServiceManager.getService("mount"));
-        try {
-            final VolumeInfo[] vols = storageManager.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();
-        }
+        // Disabled now that FUSE has been replaced by sdcardfs
         return path;
     }