From 60686586a5f9c8f78b9ad16e19782da85e89a760 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 10 Dec 2014 12:40:09 -0800 Subject: [PATCH] Add product variable PRODUCT_AAPT_PREBUILT_DPI We use search LOCAL_DPI_VARIANTS in the list of "$(PRODUCT_AAPT_PREF_CONFIG) $(PRODUCT_AAPT_PREBUILT_DPI)" and the first takes precedence. That way if we don't have a best match, we fall back to the second best, the way how it worked with PRODUCT_AAPT_CONFIG previously. Bug: 18388705 Change-Id: I8bd646c52215c65cc6e38c728857af9b64d13469 --- core/prebuilt_internal.mk | 2 +- core/product.mk | 1 + core/product_config.mk | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk index 5c02f8d3b..e7a66f037 100644 --- a/core/prebuilt_internal.mk +++ b/core/prebuilt_internal.mk @@ -116,7 +116,7 @@ PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) # Select dpi-specific source ifdef LOCAL_DPI_VARIANTS -my_dpi := $(filter $(LOCAL_DPI_VARIANTS),$(PRODUCT_AAPT_PREF_CONFIG)) +my_dpi := $(firstword $(filter $(LOCAL_DPI_VARIANTS),$(PRODUCT_AAPT_PREF_CONFIG) $(PRODUCT_AAPT_PREBUILT_DPI))) ifdef my_dpi ifdef LOCAL_DPI_FILE_STEM my_prebuilt_dpi_file_stem := $(LOCAL_DPI_FILE_STEM) diff --git a/core/product.mk b/core/product.mk index ed906cb04..f0fc92102 100644 --- a/core/product.mk +++ b/core/product.mk @@ -70,6 +70,7 @@ _product_var_list := \ PRODUCT_LOCALES \ PRODUCT_AAPT_CONFIG \ PRODUCT_AAPT_PREF_CONFIG \ + PRODUCT_AAPT_PREBUILT_DPI \ PRODUCT_PACKAGES \ PRODUCT_PACKAGES_DEBUG \ PRODUCT_PACKAGES_ENG \ diff --git a/core/product_config.mk b/core/product_config.mk index 1efff2f90..e7fa75ef5 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -306,6 +306,7 @@ endif # Add PRODUCT_LOCALES to PRODUCT_AAPT_CONFIG PRODUCT_AAPT_CONFIG := $(strip $(PRODUCT_LOCALES) $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_CONFIG)) PRODUCT_AAPT_PREF_CONFIG := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_PREF_CONFIG)) +PRODUCT_AAPT_PREBUILT_DPI := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_PREBUILT_DPI)) # Keep a copy of the space-separated config PRODUCT_AAPT_CONFIG_SP := $(PRODUCT_AAPT_CONFIG)