summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-09-28 18:41:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-28 18:41:31 +0000
commit54412fe2ae0fb5a9dc81b999d726b5a909de3bd7 (patch)
tree7a207f9c1d1a1dbdca918015e68485ef32878e9d
parent534a49dc3282d1056f92c7ed6e0ef7fa2f9ec74e (diff)
parent28b1d678a4721e9f02b7b9498492fb3d623f21be (diff)
downloadnative-54412fe2ae0fb5a9dc81b999d726b5a909de3bd7.tar.gz
am 28b1d678: Merge "Installd: Fully decouple pre- and post-bootcomplete properties"
* commit '28b1d678a4721e9f02b7b9498492fb3d623f21be': Installd: Fully decouple pre- and post-bootcomplete properties
-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 2ded43da02..46d72fd0fc 100644
--- a/cmds/installd/commands.cpp
+++ b/cmds/installd/commands.cpp
@@ -770,24 +770,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);