diff options
| author | 2019-06-27 13:50:41 -0700 | |
|---|---|---|
| committer | 2019-06-27 13:50:41 -0700 | |
| commit | 7d8313c0f1490c1a656c9ae2a8a5dd9bd72b98c4 (patch) | |
| tree | 53f8f3fc69057fcfaa3ff6514ceb2aaa51d71d95 /cmds/installd/InstalldNativeService.cpp | |
| parent | 5790454941b1d3136917b43f674083e9faefc431 (diff) | |
| parent | fdd81785f29287e648f11fa803f1b1df467139aa (diff) | |
Merge "Moving /oat folder creation to installd." am: 58c115fb7f am: 0db247d996
am: fdd81785f2
Change-Id: I0d7f07a12168fbf3ba6ce2c6f07ea55b5de8b8f3
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); |