diff options
Diffstat (limited to 'cmds/installd/InstalldNativeService.cpp')
| -rw-r--r-- | cmds/installd/InstalldNativeService.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index 6fee11b566..c0fb0f89a6 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -412,6 +412,33 @@ static bool prepare_app_profile_dir(const std::string& packageName, int32_t appI return true; } +binder::Status InstalldNativeService::createAppDataBatched( + const std::optional<std::vector<std::optional<std::string>>>& uuids, + const std::optional<std::vector<std::optional<std::string>>>& packageNames, + int32_t userId, int32_t flags, const std::vector<int32_t>& appIds, + const std::vector<std::string>& seInfos, const std::vector<int32_t>& targetSdkVersions, + int64_t* _aidl_return) { + ENFORCE_UID(AID_SYSTEM); + std::lock_guard<std::recursive_mutex> lock(mLock); + + ATRACE_BEGIN("createAppDataBatched"); + binder::Status ret; + for (size_t i = 0; i < uuids->size(); i++) { + std::optional<std::string> packageName = packageNames->at(i); + if (!packageName) { + continue; + } + ret = createAppData(uuids->at(i), *packageName, userId, flags, appIds[i], + seInfos[i], targetSdkVersions[i], _aidl_return); + if (!ret.isOk()) { + ATRACE_END(); + return ret; + } + } + ATRACE_END(); + return ok(); +} + binder::Status InstalldNativeService::createAppData(const std::optional<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int32_t appId, const std::string& seInfo, int32_t targetSdkVersion, int64_t* _aidl_return) { |