From 49cbd510f1f1502eb5df38ce485087555623d72b Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 6 Apr 2020 10:38:58 +0100 Subject: Pass updatable BCP packages to dex2oat. (cherry picked from commit 79dc3c681f6d7a6bd9049092db27d3ca2d32785f) Test: aosp_taimen-userdebug boots. Test: Check logcat for the new argument in the dex2oat invocations that happen on first boot. Bug: 151314205 Merged-In: I904fd0ba79350e01158321383b7b1fe5390caddf Change-Id: I8307fa10dae832787a8ddaa20125423c3c2e47df --- cmds/installd/dexopt.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp index 1af6eddb2f..5ee6a9f85a 100644 --- a/cmds/installd/dexopt.cpp +++ b/cmds/installd/dexopt.cpp @@ -374,6 +374,14 @@ class RunDex2Oat : public ExecVHelper { bool skip_compilation = vold_decrypt == "trigger_restart_min_framework" || vold_decrypt == "1"; + std::string updatable_bcp_packages = + MapPropertyToArg("dalvik.vm.dex2oat-updatable-bcp-packages-file", + "--updatable-bcp-packages-file=%s"); + if (updatable_bcp_packages.empty()) { + // Make dex2oat fail by providing non-existent file name. + updatable_bcp_packages = "--updatable-bcp-packages-file=/nonx/updatable-bcp-packages.txt"; + } + std::string resolve_startup_string_arg = MapPropertyToArg("persist.device_config.runtime.dex2oat_resolve_startup_strings", "--resolve-startup-const-strings=%s"); @@ -520,6 +528,7 @@ class RunDex2Oat : public ExecVHelper { AddRuntimeArg(dex2oat_Xms_arg); AddRuntimeArg(dex2oat_Xmx_arg); + AddArg(updatable_bcp_packages); AddArg(resolve_startup_string_arg); AddArg(image_block_size_arg); AddArg(dex2oat_compiler_filter_arg); -- cgit v1.2.3-59-g8ed1b