From c4dfe6ef30d785219f965e42cd675f99d5d9e0be Mon Sep 17 00:00:00 2001 From: Igor Viarheichyk Date: Thu, 26 Jun 2014 14:56:21 -0700 Subject: [PATCH] Add --pseudo-localize aapt parameter for builds. Some packages can override list of locales with LOCAL_AAPT_INCLUDE_ALL_RESOURCES parameter, disabling pseudolocalization. Adding new --pseudo-localize flag to aapt if pseudo-locales are specified in product locales list solves this issue. Change-Id: Iae705d4fe99453650339fd1ca65d1005671b3e4f --- core/base_rules.mk | 2 +- core/product_config.mk | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 97787f4e4a..280a532522 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -499,7 +499,7 @@ endif # Propagate local configuration options to this target. $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_PATH:=$(LOCAL_PATH) -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_AAPT_FLAGS:= $(LOCAL_AAPT_FLAGS) +$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_AAPT_FLAGS:= $(LOCAL_AAPT_FLAGS) $(PRODUCT_AAPT_FLAGS) $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JAVA_LIBRARIES:= $(LOCAL_JAVA_LIBRARIES) $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MANIFEST_PACKAGE_NAME:= $(LOCAL_MANIFEST_PACKAGE_NAME) $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MANIFEST_INSTRUMENTATION_FOR:= $(LOCAL_MANIFEST_INSTRUMENTATION_FOR) diff --git a/core/product_config.mk b/core/product_config.mk index f32a596471..94683625b8 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -324,6 +324,13 @@ PRODUCT_AAPT_CONFIG := \ PRODUCT_AAPT_PREF_CONFIG := \ $(subst $(space),$(comma),$(strip $(PRODUCT_AAPT_PREF_CONFIG))) +# product-scoped aapt flags +PRODUCT_AAPT_FLAGS := +ifneq ($(filter en_XA ar_XB,$(PRODUCT_LOCALES)),) +# Force generating resources for pseudo-locales. +PRODUCT_AAPT_FLAGS += --pseudo-localize +endif + PRODUCT_BRAND := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BRAND)) PRODUCT_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MODEL))