Remove persist.sys.fuse == false code paths
Since Android R, the FUSE prop is always on and FUSE-off is no longer
supported
Test: m
Bug: 160159282
Change-Id: Ic4414b850511fe3b4fc6df3f8b736d21335db820
diff --git a/model/PublicVolume.cpp b/model/PublicVolume.cpp
index d40e3e3..12e31ff 100644
--- a/model/PublicVolume.cpp
+++ b/model/PublicVolume.cpp
@@ -227,39 +227,36 @@
TEMP_FAILURE_RETRY(waitpid(sdcardFsPid, nullptr, 0));
}
- bool isFuse = base::GetBoolProperty(kPropFuse, false);
- if (isFuse) {
- // We need to mount FUSE *after* sdcardfs, since the FUSE daemon may depend
- // on sdcardfs being up.
- LOG(INFO) << "Mounting public fuse volume";
- android::base::unique_fd fd;
- int user_id = getMountUserId();
- int result = MountUserFuse(user_id, getInternalPath(), stableName, &fd);
+ // We need to mount FUSE *after* sdcardfs, since the FUSE daemon may depend
+ // on sdcardfs being up.
+ LOG(INFO) << "Mounting public fuse volume";
+ android::base::unique_fd fd;
+ int user_id = getMountUserId();
+ int result = MountUserFuse(user_id, getInternalPath(), stableName, &fd);
- if (result != 0) {
- LOG(ERROR) << "Failed to mount public fuse volume";
- doUnmount();
- return -result;
- }
-
- mFuseMounted = true;
- auto callback = getMountCallback();
- if (callback) {
- bool is_ready = false;
- callback->onVolumeChecking(std::move(fd), getPath(), getInternalPath(), &is_ready);
- if (!is_ready) {
- LOG(ERROR) << "Failed to complete public volume mount";
- doUnmount();
- return -EIO;
- }
- }
-
- ConfigureReadAheadForFuse(GetFuseMountPathForUser(user_id, stableName), 256u);
-
- // See comment in model/EmulatedVolume.cpp
- ConfigureMaxDirtyRatioForFuse(GetFuseMountPathForUser(user_id, stableName), 40u);
+ if (result != 0) {
+ LOG(ERROR) << "Failed to mount public fuse volume";
+ doUnmount();
+ return -result;
}
+ mFuseMounted = true;
+ auto callback = getMountCallback();
+ if (callback) {
+ bool is_ready = false;
+ callback->onVolumeChecking(std::move(fd), getPath(), getInternalPath(), &is_ready);
+ if (!is_ready) {
+ LOG(ERROR) << "Failed to complete public volume mount";
+ doUnmount();
+ return -EIO;
+ }
+ }
+
+ ConfigureReadAheadForFuse(GetFuseMountPathForUser(user_id, stableName), 256u);
+
+ // See comment in model/EmulatedVolume.cpp
+ ConfigureMaxDirtyRatioForFuse(GetFuseMountPathForUser(user_id, stableName), 40u);
+
return OK;
}