From 3c214741008d9c14417938921e0be73778f223ac Mon Sep 17 00:00:00 2001 From: "Rock.Yeh" Date: Wed, 22 Apr 2020 17:01:10 +0800 Subject: [PATCH] Add PRODUCT_SYSTEM_SERVER_JARS_EXTRA interface This interface allows vendor to append their system server jars after AOSP's without changing inherit order. Test: booting Test: build pass on branch r-fs-release with this patch Bug: 140712566 Change-Id: I0ddf35bdf725c262f817985f5494b5968db21fcd Merged-In: I0ddf35bdf725c262f817985f5494b5968db21fcd (cherry picked from commit 2a703ce2f66d61595c3e492c5a27e1602913667c) Exempt-From-Owner-Approval: cherry-pick --- core/product.mk | 4 ++++ core/product_config.mk | 3 +++ 2 files changed, 7 insertions(+) diff --git a/core/product.mk b/core/product.mk index 8e82f7126..464e0f3c2 100644 --- a/core/product.mk +++ b/core/product.mk @@ -237,6 +237,10 @@ _product_list_vars += PRODUCT_SYSTEM_SERVER_JARS # List of system_server jars delivered via apex. Format = :. _product_list_vars += PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS +# Additional system server jars to be appended at the end of the common list. +# This is necessary to avoid jars reordering due to makefile inheritance order. +_product_list_vars += PRODUCT_SYSTEM_SERVER_JARS_EXTRA + # All of the apps that we force preopt, this overrides WITH_DEXPREOPT. _product_list_vars += PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK _product_list_vars += PRODUCT_DEXPREOPT_SPEED_APPS diff --git a/core/product_config.mk b/core/product_config.mk index aabd47270..699d62aaf 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -231,6 +231,9 @@ PRODUCT_AAPT_CONFIG := $(subst $(space),$(comma),$(PRODUCT_AAPT_CONFIG)) # Extra boot jars must be appended at the end after common boot jars. PRODUCT_BOOT_JARS += $(PRODUCT_BOOT_JARS_EXTRA) +# The extra system server jars must be appended at the end after common system server jars. +PRODUCT_SYSTEM_SERVER_JARS += $(PRODUCT_SYSTEM_SERVER_JARS_EXTRA) + ifndef PRODUCT_SYSTEM_NAME PRODUCT_SYSTEM_NAME := $(PRODUCT_NAME) endif