Loading cmds/installd/dexopt.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd const char* input_file_name, const char* output_file_name, int swap_fd, const char* instruction_set, const char* compiler_filter, bool debuggable, bool post_bootcomplete, bool background_job_compile, int profile_fd, const char* class_loader_context, int target_sdk_version, bool disable_hidden_api_checks) { const char* class_loader_context, int target_sdk_version, bool enable_hidden_api_checks) { static const unsigned int MAX_INSTRUCTION_SET_LEN = 7; if (strlen(instruction_set) >= MAX_INSTRUCTION_SET_LEN) { Loading Loading @@ -439,7 +439,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd + (disable_cdex ? 1 : 0) + (generate_minidebug_info ? 1 : 0) + (target_sdk_version != 0 ? 2 : 0) + (disable_hidden_api_checks ? 2 : 0)]; + (enable_hidden_api_checks ? 2 : 0)]; int i = 0; argv[i++] = dex2oat_bin; argv[i++] = zip_fd_arg; Loading Loading @@ -513,9 +513,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd argv[i++] = RUNTIME_ARG; argv[i++] = target_sdk_version_arg; } if (disable_hidden_api_checks) { if (enable_hidden_api_checks) { argv[i++] = RUNTIME_ARG; argv[i++] = "-Xno-hidden-api-checks"; argv[i++] = "-Xhidden-api-checks"; } // Do not add after dex2oat_flags, they should override others for debugging. Loading Loading @@ -1801,7 +1801,7 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins bool profile_guided = (dexopt_flags & DEXOPT_PROFILE_GUIDED) != 0; bool is_secondary_dex = (dexopt_flags & DEXOPT_SECONDARY_DEX) != 0; bool background_job_compile = (dexopt_flags & DEXOPT_IDLE_BACKGROUND_JOB) != 0; bool disable_hidden_api_checks = (dexopt_flags & DEXOPT_DISABLE_HIDDEN_API_CHECKS) != 0; bool enable_hidden_api_checks = (dexopt_flags & DEXOPT_ENABLE_HIDDEN_API_CHECKS) != 0; // Check if we're dealing with a secondary dex file and if we need to compile it. std::string oat_dir_str; Loading Loading @@ -1899,7 +1899,7 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins reference_profile_fd.get(), class_loader_context, target_sdk_version, disable_hidden_api_checks); enable_hidden_api_checks); _exit(68); /* only get here on exec failure */ } else { int res = wait_child(pid); Loading cmds/installd/installd_constants.h +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ constexpr int DEXOPT_STORAGE_DE = 1 << 8; // Tells the compiler that it is invoked from the background service. This // controls whether extra debugging flags can be used (taking more compile time.) constexpr int DEXOPT_IDLE_BACKGROUND_JOB = 1 << 9; constexpr int DEXOPT_DISABLE_HIDDEN_API_CHECKS = 1 << 10; constexpr int DEXOPT_ENABLE_HIDDEN_API_CHECKS = 1 << 10; /* all known values for dexopt flags */ constexpr int DEXOPT_MASK = Loading @@ -64,7 +64,7 @@ constexpr int DEXOPT_MASK = | DEXOPT_FORCE | DEXOPT_STORAGE_CE | DEXOPT_STORAGE_DE | DEXOPT_DISABLE_HIDDEN_API_CHECKS; | DEXOPT_ENABLE_HIDDEN_API_CHECKS; // NOTE: keep in sync with StorageManager constexpr int FLAG_STORAGE_DE = 1 << 0; Loading cmds/installd/otapreopt.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -78,8 +78,8 @@ static_assert(DEXOPT_SECONDARY_DEX == 1 << 5, "DEXOPT_SECONDARY_DEX unexpected. static_assert(DEXOPT_FORCE == 1 << 6, "DEXOPT_FORCE unexpected."); static_assert(DEXOPT_STORAGE_CE == 1 << 7, "DEXOPT_STORAGE_CE unexpected."); static_assert(DEXOPT_STORAGE_DE == 1 << 8, "DEXOPT_STORAGE_DE unexpected."); static_assert(DEXOPT_DISABLE_HIDDEN_API_CHECKS == 1 << 10, "DEXOPT_DISABLE_HIDDEN_API_CHECKS unexpected"); static_assert(DEXOPT_ENABLE_HIDDEN_API_CHECKS == 1 << 10, "DEXOPT_ENABLE_HIDDEN_API_CHECKS unexpected"); static_assert(DEXOPT_MASK == 0x5fe, "DEXOPT_MASK unexpected."); Loading Loading
cmds/installd/dexopt.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd const char* input_file_name, const char* output_file_name, int swap_fd, const char* instruction_set, const char* compiler_filter, bool debuggable, bool post_bootcomplete, bool background_job_compile, int profile_fd, const char* class_loader_context, int target_sdk_version, bool disable_hidden_api_checks) { const char* class_loader_context, int target_sdk_version, bool enable_hidden_api_checks) { static const unsigned int MAX_INSTRUCTION_SET_LEN = 7; if (strlen(instruction_set) >= MAX_INSTRUCTION_SET_LEN) { Loading Loading @@ -439,7 +439,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd + (disable_cdex ? 1 : 0) + (generate_minidebug_info ? 1 : 0) + (target_sdk_version != 0 ? 2 : 0) + (disable_hidden_api_checks ? 2 : 0)]; + (enable_hidden_api_checks ? 2 : 0)]; int i = 0; argv[i++] = dex2oat_bin; argv[i++] = zip_fd_arg; Loading Loading @@ -513,9 +513,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd argv[i++] = RUNTIME_ARG; argv[i++] = target_sdk_version_arg; } if (disable_hidden_api_checks) { if (enable_hidden_api_checks) { argv[i++] = RUNTIME_ARG; argv[i++] = "-Xno-hidden-api-checks"; argv[i++] = "-Xhidden-api-checks"; } // Do not add after dex2oat_flags, they should override others for debugging. Loading Loading @@ -1801,7 +1801,7 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins bool profile_guided = (dexopt_flags & DEXOPT_PROFILE_GUIDED) != 0; bool is_secondary_dex = (dexopt_flags & DEXOPT_SECONDARY_DEX) != 0; bool background_job_compile = (dexopt_flags & DEXOPT_IDLE_BACKGROUND_JOB) != 0; bool disable_hidden_api_checks = (dexopt_flags & DEXOPT_DISABLE_HIDDEN_API_CHECKS) != 0; bool enable_hidden_api_checks = (dexopt_flags & DEXOPT_ENABLE_HIDDEN_API_CHECKS) != 0; // Check if we're dealing with a secondary dex file and if we need to compile it. std::string oat_dir_str; Loading Loading @@ -1899,7 +1899,7 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins reference_profile_fd.get(), class_loader_context, target_sdk_version, disable_hidden_api_checks); enable_hidden_api_checks); _exit(68); /* only get here on exec failure */ } else { int res = wait_child(pid); Loading
cmds/installd/installd_constants.h +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ constexpr int DEXOPT_STORAGE_DE = 1 << 8; // Tells the compiler that it is invoked from the background service. This // controls whether extra debugging flags can be used (taking more compile time.) constexpr int DEXOPT_IDLE_BACKGROUND_JOB = 1 << 9; constexpr int DEXOPT_DISABLE_HIDDEN_API_CHECKS = 1 << 10; constexpr int DEXOPT_ENABLE_HIDDEN_API_CHECKS = 1 << 10; /* all known values for dexopt flags */ constexpr int DEXOPT_MASK = Loading @@ -64,7 +64,7 @@ constexpr int DEXOPT_MASK = | DEXOPT_FORCE | DEXOPT_STORAGE_CE | DEXOPT_STORAGE_DE | DEXOPT_DISABLE_HIDDEN_API_CHECKS; | DEXOPT_ENABLE_HIDDEN_API_CHECKS; // NOTE: keep in sync with StorageManager constexpr int FLAG_STORAGE_DE = 1 << 0; Loading
cmds/installd/otapreopt.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -78,8 +78,8 @@ static_assert(DEXOPT_SECONDARY_DEX == 1 << 5, "DEXOPT_SECONDARY_DEX unexpected. static_assert(DEXOPT_FORCE == 1 << 6, "DEXOPT_FORCE unexpected."); static_assert(DEXOPT_STORAGE_CE == 1 << 7, "DEXOPT_STORAGE_CE unexpected."); static_assert(DEXOPT_STORAGE_DE == 1 << 8, "DEXOPT_STORAGE_DE unexpected."); static_assert(DEXOPT_DISABLE_HIDDEN_API_CHECKS == 1 << 10, "DEXOPT_DISABLE_HIDDEN_API_CHECKS unexpected"); static_assert(DEXOPT_ENABLE_HIDDEN_API_CHECKS == 1 << 10, "DEXOPT_ENABLE_HIDDEN_API_CHECKS unexpected"); static_assert(DEXOPT_MASK == 0x5fe, "DEXOPT_MASK unexpected."); Loading