Move enabling sdcardfs behind a property
This allows devices that have sdcardfs enabled in the kernel to not use
it. When external_storage.sdcardfs.enabled=0, sdcardfs will not be
mounted. This is treated as default true to not affect upgrading
devices. It does not use the old ro.sys.sdcardfs as that has been
repurposed over time and no longer can be relied on to turn off
sdcardfs. This is included within emulated_storage.mk
Bug: 155222498
Test: mount|grep "type sdcardfs" should find nothing after boot complete
if external_storage.sdcardfs.enabled=0
Change-Id: I23d75fb1225aeabbcb1a035ad62fd042b6b3c7b5
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index e7cd36e..bb5aa86 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -49,7 +49,7 @@
mRawPath = rawPath;
mLabel = "emulated";
mFuseMounted = false;
- mUseSdcardFs = IsFilesystemSupported("sdcardfs");
+ mUseSdcardFs = IsSdcardfsUsed();
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
}
@@ -60,7 +60,7 @@
mRawPath = rawPath;
mLabel = fsUuid;
mFuseMounted = false;
- mUseSdcardFs = IsFilesystemSupported("sdcardfs");
+ mUseSdcardFs = IsSdcardfsUsed();
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
}