summaryrefslogtreecommitdiff
path: root/cmds/installd/InstalldNativeService.cpp
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-05-31 16:39:58 -0700
committer Andreas Gampe <agampe@google.com> 2017-06-01 08:48:40 -0700
commitc523409f0fd03aa498cedc486f85e9a4b7257f3a (patch)
tree8efd416816cac879442bf59008bf0f1bb3ea849f /cmds/installd/InstalldNativeService.cpp
parent3040d9db984237259c0ec7238ad9081018ffe808 (diff)
Installd: deleteOdex's outputPath can be null
Add @nullable, as the outputPath can be null for system apps. Bug: 62236497 Test: m Test: Fill up /data, apply OTA Change-Id: I61d86721b485f85195b153d76ce25412dcb68be6
Diffstat (limited to 'cmds/installd/InstalldNativeService.cpp')
-rw-r--r--cmds/installd/InstalldNativeService.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index dec23d3945..3041467f70 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -2249,13 +2249,13 @@ binder::Status InstalldNativeService::moveAb(const std::string& apkPath,
}
binder::Status InstalldNativeService::deleteOdex(const std::string& apkPath,
- const std::string& instructionSet, const std::string& outputPath) {
+ const std::string& instructionSet, const std::unique_ptr<std::string>& outputPath) {
ENFORCE_UID(AID_SYSTEM);
std::lock_guard<std::recursive_mutex> lock(mLock);
const char* apk_path = apkPath.c_str();
const char* instruction_set = instructionSet.c_str();
- const char* oat_dir = outputPath.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();