diff options
author | Brian Carlstrom <bdc@google.com> | 2014-08-04 18:27:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-01 08:22:51 +0000 |
commit | 74b3ecf485254d8cb4ae2b1d4d5221454738a58d (patch) | |
tree | 6f4184408b07e6a9787ffbf3c35f05c67f2f57db /cmds | |
parent | 9c49e21d80cb55b7d77fdf118f06b88100141678 (diff) | |
parent | 538998f204d1e542e235de9e7ce18ef4dc68c9cc (diff) | |
download | frameworks_native-74b3ecf485254d8cb4ae2b1d4d5221454738a58d.zip frameworks_native-74b3ecf485254d8cb4ae2b1d4d5221454738a58d.tar.gz frameworks_native-74b3ecf485254d8cb4ae2b1d4d5221454738a58d.tar.bz2 |
Merge "Disable compilation based on vold.decrypt. [frameworks/native]"
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 09321c2..a7cf0ac 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -642,6 +642,13 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, bool have_dex2oat_flags = property_get("dalvik.vm.dex2oat-flags", dex2oat_flags, NULL) > 0; ALOGV("dalvik.vm.dex2oat-flags=%s\n", dex2oat_flags); + // If we booting without the real /data, don't spend time compiling. + char vold_decrypt[PROPERTY_VALUE_MAX]; + bool have_vold_decrypt = property_get("vold.decrypt", vold_decrypt, "") > 0; + bool skip_compilation = (have_vold_decrypt && + (strcmp(vold_decrypt, "trigger_restart_min_framework") == 0 || + (strcmp(vold_decrypt, "1") == 0))); + static const char* DEX2OAT_BIN = "/system/bin/dex2oat"; static const char* RUNTIME_ARG = "--runtime-arg"; @@ -696,7 +703,10 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, if (have_dex2oat_Xmx_flag) { sprintf(dex2oat_Xmx_arg, "-Xmx%s", dex2oat_Xmx_flag); } - if (have_dex2oat_compiler_filter_flag) { + if (skip_compilation) { + strcpy(dex2oat_compiler_filter_arg, "--compiler-filter=interpret-only"); + have_dex2oat_compiler_filter_flag = true; + } else if (have_dex2oat_compiler_filter_flag) { sprintf(dex2oat_compiler_filter_arg, "--compiler-filter=%s", dex2oat_compiler_filter_flag); } |