From 502892a9364a7e9e7cb28820edc1af605fc3e073 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 6 Jul 2018 13:29:43 -0700 Subject: [PATCH] Add logic to preopt both archs for SDK libs Update stale PRODUCT_SYSTEM_SERVER_JARS list since com.android.location.provider was renamed to com.android.location.provider.impl. Added logic to preopt both archs for SDK libs that are also system server JARS. Bug: 110780021 Test: manual and verify speed compiled (cherry picked from commit 4568c2d908eee03edea5793b4081565cfdea74cf) Merged-In: I34e728444ffda6db3375b638028d54b6ab623209 Change-Id: If0cb68ba4808aa8716099c5447645f4baac63f30 --- core/dex_preopt_odex_install.mk | 9 +++++++-- target/product/core_minimal.mk | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 089df6f38e..358502688a 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -191,14 +191,19 @@ installed_odex := $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) else # boot jar ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) + +my_module_multilib := $(LOCAL_MULTILIB) +# If the module is not an SDK library and it's a system server jar, only preopt the primary arch. +my_filtered_lib_name := $(patsubst %.impl,%,$(LOCAL_MODULE)) +ifeq (,$(filter $(JAVA_SDK_LIBRARIES),$(my_filtered_lib_name))) # For a Java library, by default we build odex for both 1st arch and 2nd arch. # But it can be overridden with "LOCAL_MULTILIB := first". ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE))) # For system server jars, we build for only "first". my_module_multilib := first -else -my_module_multilib := $(LOCAL_MULTILIB) endif +endif + # ################################################# # Odex for the 1st arch my_2nd_arch_prefix := diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index a4e5fb2411..a991c43f09 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -97,7 +97,7 @@ PRODUCT_SYSTEM_SERVER_JARS := \ services \ ethernet-service \ wifi-service \ - com.android.location.provider \ + com.android.location.provider.impl \ # The set of packages whose code can be loaded by the system server. PRODUCT_SYSTEM_SERVER_APPS += \