summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-09-28 08:55:01 -0700
committerAndreas Gampe <agampe@google.com>2015-09-28 11:33:19 -0700
commit919461cbeef3e9f35388fc099a5fcdae1cb79cc6 (patch)
treee673301394b3e3df417d8763ed2effd406393aab
parentd529cd470afa98512bf2eab7a58dae5a9b6e4847 (diff)
downloadnative-919461cbeef3e9f35388fc099a5fcdae1cb79cc6.tar.gz
Installd: Fully decouple pre- and post-bootcomplete properties
Do not fall back to dalvik.vm.dex2oat-threads if dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use the value of dalvik.vm.image-dex2oat-threads. Instead use the default behavior of dex2oat in that situation. Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6
-rw-r--r--cmds/installd/commands.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp
index 906a09bafd..d2abd40f5b 100644
--- a/cmds/installd/commands.cpp
+++ b/cmds/installd/commands.cpp
@@ -719,24 +719,11 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
dex2oat_compiler_filter_flag, NULL) > 0;
char dex2oat_threads_buf[PROPERTY_VALUE_MAX];
- bool have_dex2oat_threads_flag = false;
- if (!post_bootcomplete) {
- have_dex2oat_threads_flag = property_get("dalvik.vm.boot-dex2oat-threads",
- dex2oat_threads_buf,
- NULL) > 0;
- // If there's no boot property, fall back to the image property.
- if (!have_dex2oat_threads_flag) {
- have_dex2oat_threads_flag = property_get("dalvik.vm.image-dex2oat-threads",
- dex2oat_threads_buf,
- NULL) > 0;
- }
- // If there's neither, fall back to the default property.
- }
- if (!have_dex2oat_threads_flag) {
- have_dex2oat_threads_flag = property_get("dalvik.vm.dex2oat-threads",
- dex2oat_threads_buf,
- NULL) > 0;
- }
+ bool have_dex2oat_threads_flag = property_get(post_bootcomplete
+ ? "dalvik.vm.dex2oat-threads"
+ : "dalvik.vm.boot-dex2oat-threads",
+ dex2oat_threads_buf,
+ NULL) > 0;
char dex2oat_threads_arg[PROPERTY_VALUE_MAX + 2];
if (have_dex2oat_threads_flag) {
sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf);