diff options
author | Andreas Gampe <agampe@google.com> | 2015-09-28 22:51:07 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-28 22:51:07 +0000 |
commit | bcf2901af9f5737f510b968ba9dda5ba58b86f8a (patch) | |
tree | 9463d9f78e415a3467611f2811351119b76269bf | |
parent | bac4a44ac909dbf09ce7a25bd2173164fc437c74 (diff) | |
parent | 72da7fb77cc0aaeb272b0359679c841d02d5edfe (diff) | |
download | frameworks_native-bcf2901af9f5737f510b968ba9dda5ba58b86f8a.zip frameworks_native-bcf2901af9f5737f510b968ba9dda5ba58b86f8a.tar.gz frameworks_native-bcf2901af9f5737f510b968ba9dda5ba58b86f8a.tar.bz2 |
am 72da7fb7: Installd: Fully decouple pre- and post-bootcomplete properties
* commit '72da7fb77cc0aaeb272b0359679c841d02d5edfe':
Installd: Fully decouple pre- and post-bootcomplete properties
-rw-r--r-- | cmds/installd/commands.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp index d4aa7d3..c05a3d3 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); |