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
This commit is contained in:
Jeff Sharkey
2016-04-06 15:15:44 -06:00
parent 083807d61c
commit feef8b62ee

View File

@@ -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;
}