summaryrefslogtreecommitdiff
path: root/VoldNativeService.cpp
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2020-02-18 15:06:37 +0100
committerMartijn Coenen <maco@google.com>2020-02-19 12:11:34 +0100
commit816f4d94f6223cbc00f9d03e95336740dc47a6a5 (patch)
tree83678278069c622e41b418ed1a3b5755812d1b13 /VoldNativeService.cpp
parent442bb838286bd47edee68dcdae64edaa5ece55a3 (diff)
downloadvold-816f4d94f6223cbc00f9d03e95336740dc47a6a5.tar.gz
Add fixupAppDir() API.
This can be used to fixup application directories in case they have been created by some other entity besides vold; the main use case for this API right now is OBB directories, which can be created by installers outside of vold; on devices without sdcardfs, such directories and the files contained therein are not setup correctly. This API will make sure everything is setup the way it needs to be setup. Bug: 146419093 Test: inspect OBB dir after install Change-Id: I2e35b7ac2992dbb21cc950e53651ffc07cfca907
Diffstat (limited to 'VoldNativeService.cpp')
-rw-r--r--VoldNativeService.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index 6aa96700..08b46619 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -466,6 +466,14 @@ binder::Status VoldNativeService::setupAppDir(const std::string& path, int32_t a
return translate(VolumeManager::Instance()->setupAppDir(path, appUid));
}
+binder::Status VoldNativeService::fixupAppDir(const std::string& path, int32_t appUid) {
+ ENFORCE_SYSTEM_OR_ROOT;
+ CHECK_ARGUMENT_PATH(path);
+ ACQUIRE_LOCK;
+
+ return translate(VolumeManager::Instance()->fixupAppDir(path, appUid));
+}
+
binder::Status VoldNativeService::createObb(const std::string& sourcePath,
const std::string& sourceKey, int32_t ownerGid,
std::string* _aidl_return) {