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
This commit is contained in:
Igor Viarheichyk 2014-06-26 14:56:21 -07:00 committed by Ying Wang
parent 432cd6dd78
commit c4dfe6ef30
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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))