Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28b1d678 authored by Andreas Gampe's avatar Andreas Gampe Committed by Gerrit Code Review
Browse files

Merge "Installd: Fully decouple pre- and post-bootcomplete properties"

parents 905c1446 919461cb
Loading
Loading
Loading
Loading
+5 −18
Original line number Original line Diff line number Diff line
@@ -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;
                                                          dex2oat_compiler_filter_flag, NULL) > 0;


    char dex2oat_threads_buf[PROPERTY_VALUE_MAX];
    char dex2oat_threads_buf[PROPERTY_VALUE_MAX];
    bool have_dex2oat_threads_flag = false;
    bool have_dex2oat_threads_flag = property_get(post_bootcomplete
    if (!post_bootcomplete) {
                                                      ? "dalvik.vm.dex2oat-threads"
        have_dex2oat_threads_flag = property_get("dalvik.vm.boot-dex2oat-threads",
                                                      : "dalvik.vm.boot-dex2oat-threads",
                                                  dex2oat_threads_buf,
                                                  dex2oat_threads_buf,
                                                  NULL) > 0;
                                                  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;
    }
    char dex2oat_threads_arg[PROPERTY_VALUE_MAX + 2];
    char dex2oat_threads_arg[PROPERTY_VALUE_MAX + 2];
    if (have_dex2oat_threads_flag) {
    if (have_dex2oat_threads_flag) {
        sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf);
        sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf);