From feef8b62ee60c8418bd7238522c06098e61eecff Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 6 Apr 2016 15:15:44 -0600 Subject: [PATCH] Remove old FUSE bypass now that we have sdcardfs. This forces everyone to go through sdcardfs, instead of letting them around the back door. Bug: 27992761 Change-Id: If1d4d5daa4b32bb3be7de10102bab24d63552b65 --- .../android/os/storage/StorageManager.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java index 720d3f7b860ae..f2e316cf214f2 100644 --- a/core/java/android/os/storage/StorageManager.java +++ b/core/java/android/os/storage/StorageManager.java @@ -1178,23 +1178,7 @@ public class StorageManager { /** {@hide} */ public static File maybeTranslateEmulatedPathToInternal(File path) { - final IMountService mountService = IMountService.Stub.asInterface( - 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(); - } + // Disabled now that FUSE has been replaced by sdcardfs return path; }