From 2063e4f6ba6cb606db3dfd5b67927ec36ea78f68 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 6 Jun 2017 16:03:24 -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. Test: builds, boots Bug: 38231314, 27992761 Change-Id: I97b24d25599c7f86f9b535689e2f4ecf68261dac --- .../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 a6cdb03c8b67b..5046735292386 100644 --- a/core/java/android/os/storage/StorageManager.java +++ b/core/java/android/os/storage/StorageManager.java @@ -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; }