Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f618443a authored by Daniel Rosenberg's avatar Daniel Rosenberg Committed by Hung-ying Tyan
Browse files

Check property for sdcardfs usage

We should check for external_storage.sdcardfs.enabled before deciding
that the system is using sdcardfs.

Test: Run on device not using sdcardfs, but with sdcardfs present in
      kernel
Bug: 160727529
Bug: 181819712
Change-Id: I399348ddd01349fe6c2d5e8365f52eedb9752c90
parent 78a58c8a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1062,6 +1062,8 @@ int prepare_app_cache_dir(const std::string& parent, const char* name, mode_t ta

static const char* kProcFilesystems = "/proc/filesystems";
bool supports_sdcardfs() {
    if (!property_get_bool("external_storage.sdcardfs.enabled", true))
        return false;
    std::string supported;
    if (!android::base::ReadFileToString(kProcFilesystems, &supported)) {
        PLOG(ERROR) << "Failed to read supported filesystems";