Merge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into rvc-dev
diff --git a/Android.bp b/Android.bp
index 03dde1e..b033647 100644
--- a/Android.bp
+++ b/Android.bp
@@ -151,12 +151,10 @@
product_variables: {
arc: {
exclude_srcs: [
- "AppFuseUtil.cpp",
"model/ObbVolume.cpp",
],
static_libs: [
"arc_services_aidl",
- "libarcappfuse",
"libarcobbvolume",
],
},
@@ -186,7 +184,6 @@
arc: {
static_libs: [
"arc_services_aidl",
- "libarcappfuse",
"libarcobbvolume",
],
},
diff --git a/model/PrivateVolume.cpp b/model/PrivateVolume.cpp
index 75757f7..e146633 100644
--- a/model/PrivateVolume.cpp
+++ b/model/PrivateVolume.cpp
@@ -177,6 +177,10 @@
return -EIO;
}
+ return OK;
+}
+
+void PrivateVolume::doPostMount() {
auto vol_manager = VolumeManager::Instance();
std::string mediaPath(mPath + "/media");
@@ -189,8 +193,6 @@
addVolume(vol);
vol->create();
}
-
- return OK;
}
status_t PrivateVolume::doUnmount() {
diff --git a/model/PrivateVolume.h b/model/PrivateVolume.h
index 9780485..607c4d1 100644
--- a/model/PrivateVolume.h
+++ b/model/PrivateVolume.h
@@ -49,6 +49,7 @@
status_t doCreate() override;
status_t doDestroy() override;
status_t doMount() override;
+ void doPostMount() override;
status_t doUnmount() override;
status_t doFormat(const std::string& fsType) override;
diff --git a/model/VolumeBase.cpp b/model/VolumeBase.cpp
index 687d4f7..27448da 100644
--- a/model/VolumeBase.cpp
+++ b/model/VolumeBase.cpp
@@ -232,9 +232,14 @@
status_t res = doMount();
setState(res == OK ? State::kMounted : State::kUnmountable);
+ if (res == OK) {
+ doPostMount();
+ }
return res;
}
+void VolumeBase::doPostMount() {}
+
status_t VolumeBase::unmount() {
if (mState != State::kMounted) {
LOG(WARNING) << getId() << " unmount requires state mounted";
diff --git a/model/VolumeBase.h b/model/VolumeBase.h
index 078bb0c..689750d 100644
--- a/model/VolumeBase.h
+++ b/model/VolumeBase.h
@@ -120,6 +120,7 @@
virtual status_t doCreate();
virtual status_t doDestroy();
virtual status_t doMount() = 0;
+ virtual void doPostMount();
virtual status_t doUnmount() = 0;
virtual status_t doFormat(const std::string& fsType);