Use --pseudo-localize only with compile phase in AAPT2

AAPT2 does pseudo-localization in compile phase. Passing --pseudo-localize
to the link phase causes an error.
Bug:25958912

Change-Id: I6ced0979884cb0d718018f995f9b2f6476d401cb
This commit is contained in:
Adam Lesinski 2016-01-26 12:17:32 -08:00
parent 97f48ebeab
commit 497888de8c
2 changed files with 8 additions and 3 deletions

View File

@ -38,7 +38,7 @@ my_generated_resources_flata += $(rs_gen_resource_flata)
endif
$(my_res_resources_flat) $(my_overlay_resources_flat) $(my_generated_resources_flata): \
PRIVATE_AAPT2_CFLAGS := $(addprefix --product ,$(my_aapt_characteristics))
PRIVATE_AAPT2_CFLAGS := $(addprefix --product ,$(my_aapt_characteristics)) $(PRODUCT_AAPT2_CFLAGS)
# Link the static library resource packages.
my_static_library_resources := $(foreach l, $(LOCAL_STATIC_JAVA_LIBRARIES),\

View File

@ -299,9 +299,14 @@ PRODUCT_AAPT_CONFIG := \
# product-scoped aapt flags
PRODUCT_AAPT_FLAGS :=
PRODUCT_AAPT2_CFLAGS :=
ifneq ($(filter en_XA ar_XB,$(PRODUCT_LOCALES)),)
# Force generating resources for pseudo-locales.
PRODUCT_AAPT_FLAGS += --pseudo-localize
# Force generating resources for pseudo-locales.
ifdef USE_AAPT2
PRODUCT_AAPT2_CFLAGS += --pseudo-localize
else
PRODUCT_AAPT_FLAGS += --pseudo-localize
endif
endif
PRODUCT_BRAND := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BRAND))