diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 68c46f5b3..a347d05bf 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -151,6 +151,13 @@ ifndef LOCAL_DEX_PREOPT_FLAGS LOCAL_DEX_PREOPT_FLAGS := $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS) endif endif + +# Jars of system server, and apps loaded into system server should be +# compiled with the 'speed' compiler filter. +ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE))) + LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed +endif + $(built_odex): PRIVATE_DEX_PREOPT_FLAGS := $(LOCAL_DEX_PREOPT_FLAGS) $(built_vdex): $(built_odex) $(built_art): $(built_odex) diff --git a/core/product.mk b/core/product.mk index 3d201689b..1e5a30e1f 100644 --- a/core/product.mk +++ b/core/product.mk @@ -112,6 +112,7 @@ _product_var_list := \ PRODUCT_SUPPORTS_VERITY_FEC \ PRODUCT_OEM_PROPERTIES \ PRODUCT_SYSTEM_PROPERTY_BLACKLIST \ + PRODUCT_SYSTEM_SERVER_APPS \ PRODUCT_SYSTEM_SERVER_JARS \ PRODUCT_VBOOT_SIGNING_KEY \ PRODUCT_VBOOT_SIGNING_SUBKEY \ diff --git a/target/product/core.mk b/target/product/core.mk index c4c7cabf1..72a7e8d6b 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -61,4 +61,11 @@ PRODUCT_PACKAGES += \ VpnDialogs \ MmsService +# The set of packages whose code can be loaded by the system server. +PRODUCT_SYSTEM_SERVER_APPS += \ + FusedLocation \ + InputDevices \ + KeyChain \ + Telecom \ + $(call inherit-product, $(SRC_TARGET_DIR)/product/core_base.mk) diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index 14d4e6a7e..1cde84422 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -110,6 +110,11 @@ PRODUCT_SYSTEM_SERVER_JARS := \ ethernet-service \ wifi-service +# The set of packages whose code can be loaded by the system server. +PRODUCT_SYSTEM_SERVER_APPS += \ + SettingsProvider \ + WallpaperBackup + # Adoptable external storage supports both ext4 and f2fs PRODUCT_PACKAGES += \ e2fsck \ diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk index 319a1060d..2fb450dde 100644 --- a/target/product/core_tiny.mk +++ b/target/product/core_tiny.mk @@ -105,6 +105,13 @@ PRODUCT_SYSTEM_SERVER_JARS := \ services \ wifi-service +# The set of packages whose code can be loaded by the system server. +PRODUCT_SYSTEM_SERVER_APPS += \ + FusedLocation \ + InputDevices \ + SettingsProvider \ + WallpaperBackup \ + PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.zygote=zygote32 PRODUCT_COPY_FILES += \