summaryrefslogtreecommitdiff
path: root/cmds/installd/InstalldNativeService.cpp
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2021-06-17 20:39:18 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-06-17 20:39:18 +0000
commit54d29c4070df494d6d17d1d5df69b03368f8d2d7 (patch)
tree9c5890b8d843947a38044b47fd147ad7a72ae19a /cmds/installd/InstalldNativeService.cpp
parent07a20e9a8174d91ce6b92c52a7c2970ba669de8d (diff)
parentd8ee0ace65b784dbdb898eaf19971e17718a6110 (diff)
Merge changes from topics "delete_odex", "verify-prof" am: d8ee0ace65
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1734999 Change-Id: Ibf903bf38f68e451e083131c28d88b2fe652da2f
Diffstat (limited to 'cmds/installd/InstalldNativeService.cpp')
-rw-r--r--cmds/installd/InstalldNativeService.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index c55fc6af83..a176df9789 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -2354,7 +2354,7 @@ binder::Status InstalldNativeService::copySystemProfile(const std::string& syste
// TODO: Consider returning error codes.
binder::Status InstalldNativeService::mergeProfiles(int32_t uid, const std::string& packageName,
- const std::string& profileName, bool* _aidl_return) {
+ const std::string& profileName, int* _aidl_return) {
ENFORCE_UID(AID_SYSTEM);
CHECK_ARGUMENT_PACKAGE_NAME(packageName);
std::lock_guard<std::recursive_mutex> lock(mLock);
@@ -2654,7 +2654,8 @@ binder::Status InstalldNativeService::moveAb(const std::string& apkPath,
}
binder::Status InstalldNativeService::deleteOdex(const std::string& apkPath,
- const std::string& instructionSet, const std::optional<std::string>& outputPath) {
+ const std::string& instructionSet, const std::optional<std::string>& outputPath,
+ int64_t* _aidl_return) {
ENFORCE_UID(AID_SYSTEM);
CHECK_ARGUMENT_PATH(apkPath);
CHECK_ARGUMENT_PATH(outputPath);
@@ -2664,8 +2665,8 @@ binder::Status InstalldNativeService::deleteOdex(const std::string& apkPath,
const char* instruction_set = instructionSet.c_str();
const char* oat_dir = outputPath ? outputPath->c_str() : nullptr;
- bool res = delete_odex(apk_path, instruction_set, oat_dir);
- return res ? ok() : error();
+ *_aidl_return = delete_odex(apk_path, instruction_set, oat_dir);
+ return *_aidl_return == -1 ? error() : ok();
}
// This kernel feature is experimental.