Cleanup global FileFetcher
This global instance is modifiable everywhere and
is hard to maintain. It also contains references as
out-variables, which is not the standard.
Clean it up by refactoring it into a public (i.e.
not in details namespace) class, FileSystem.
Introduce VintfObject::InitFileSystem that allows
the behavior to be changed before any files are read.
Bug: 37999212
Test: host and target libvintf_test, vintf_object_test
Change-Id: I1c64b31fd37119450be89dfd1d2bfe76a71ccf3d
Merged-In: I1c64b31fd37119450be89dfd1d2bfe76a71ccf3d
diff --git a/utils.cpp b/utils.cpp
index 5b2bb7d..c6425d8 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -17,6 +17,7 @@
#include "utils.h"
#ifdef LIBVINTF_TARGET
+#include <android-base/logging.h>
#include <android-base/properties.h>
#endif
@@ -24,9 +25,6 @@
namespace vintf {
namespace details {
-static FileFetcher fetcher;
-FileFetcher* gFetcher = &fetcher;
-
static PartitionMounter partitionMounter;
PartitionMounter* gPartitionMounter = &partitionMounter;