diff options
| author | 2019-06-27 14:49:04 -0700 | |
|---|---|---|
| committer | 2019-06-27 14:49:04 -0700 | |
| commit | b51f8a3489baa67dd92f58761b2355398baf97a4 (patch) | |
| tree | 86b586a1829e1a4ed2701f3eed0067c5c7f6af66 /cmds/installd/InstalldNativeService.cpp | |
| parent | 962036d2799c3cc648f59c1779071e9d82390196 (diff) | |
| parent | 7d8313c0f1490c1a656c9ae2a8a5dd9bd72b98c4 (diff) | |
Merge "Moving /oat folder creation to installd." am: 58c115fb7f am: 0db247d996 am: fdd81785f2
am: 7d8313c0f1
Change-Id: Iebd7b1d3ed8d1b3a62678311fd21ce58928da19c
Diffstat (limited to 'cmds/installd/InstalldNativeService.cpp')
| -rw-r--r-- | cmds/installd/InstalldNativeService.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index caac2e89a7..dd51898422 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -2107,10 +2107,15 @@ binder::Status InstalldNativeService::dexopt(const std::string& apkPath, int32_t CHECK_ARGUMENT_PATH(dexMetadataPath); std::lock_guard<std::recursive_mutex> lock(mLock); + const char* oat_dir = getCStr(outputPath); + const char* instruction_set = instructionSet.c_str(); + if (oat_dir != nullptr && !createOatDir(oat_dir, instruction_set).isOk()) { + // Can't create oat dir - let dexopt use cache dir. + oat_dir = nullptr; + } + const char* apk_path = apkPath.c_str(); const char* pkgname = getCStr(packageName, "*"); - const char* instruction_set = instructionSet.c_str(); - const char* oat_dir = getCStr(outputPath); const char* compiler_filter = compilerFilter.c_str(); const char* volume_uuid = getCStr(uuid); const char* class_loader_context = getCStr(classLoaderContext); |