Handle stub volumes in StorageSessionController
Currently, StorageSessionController.shouldHandle() returns true only for emulated volumes and public volumes. As a result, even when we call MountUserFuse() in StubVolume::doMount(), stub volumes for external storage (MyFiles and removable media) are not covered with the Android FUSE layer which is required for features like EXIF redaction. This CL modifies StorageSessionController.shouldHandle() so that stub volumes can be properly handled by StorageSessionController. Bug: 123377807 Bug: 123641356 Bug: 132796154 Test: $ ls -lZ /storage | grep CAFEF00D Test: $ atest MediaStore_Images_MediaTest#testLocationRedaction Test: Tested in R Change-Id: I74caa0c16bd0021c561c599616c53076022aa4de Merged-In: I74caa0c16bd0021c561c599616c53076022aa4de
This commit is contained in:
@@ -361,7 +361,11 @@ public final class StorageSessionController {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isSupportedVolume(VolumeInfo vol) {
|
||||
return isEmulatedOrPublic(vol) || vol.type == VolumeInfo.TYPE_STUB;
|
||||
}
|
||||
|
||||
private boolean shouldHandle(@Nullable VolumeInfo vol) {
|
||||
return mIsFuseEnabled && !mIsResetting && (vol == null || isEmulatedOrPublic(vol));
|
||||
return mIsFuseEnabled && !mIsResetting && (vol == null || isSupportedVolume(vol));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user