Fix passing --classpath-dir to dex2oat for split apks.
Merged wrong version of CL in by mistake. CL should have been
cherry-picked from cc5c4e32637601432bc6359fb7ff34e4cadb6502.
Bug: 34169257
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests
Change-Id: Ibebcdce1c9ab0de3254727c8dfc3d0de18932f1c
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index 7776764..0d89da4 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -362,14 +362,14 @@
sprintf(profile_arg, "--profile-file-fd=%d", profile_fd);
}
- // Get the directory of the apk to pass as a base directory.
- char base_dir[arraysize("--base-dir=") + PKG_PATH_MAX];
+ // Get the directory of the apk to pass as a base classpath directory.
+ char base_dir[arraysize("--classpath-dir=") + PKG_PATH_MAX];
std::string apk_dir(input_file_name);
unsigned long dir_index = apk_dir.rfind('/');
bool has_base_dir = dir_index != std::string::npos;
if (has_base_dir) {
apk_dir = apk_dir.substr(0, dir_index);
- sprintf(base_dir, "--base-dir=%s", apk_dir.c_str());
+ sprintf(base_dir, "--classpath-dir=%s", apk_dir.c_str());
}