am a0f464a8: New PRODUCT_AAPT_PREF_CONFIG.

* commit 'a0f464a8e7f006177db084df7e925bbb8e5ffed3':
  New PRODUCT_AAPT_PREF_CONFIG.
This commit is contained in:
Dianne Hackborn 2011-10-17 11:31:38 -07:00 committed by Android Git Automerger
commit 9baabf8d7e
5 changed files with 10 additions and 1 deletions

View File

@ -118,7 +118,7 @@ else
endif
# A change in the list of aapt configs warrants an installclean, too.
aapt_config_list := $(strip $(PRODUCT_AAPT_CONFIG))
aapt_config_list := $(strip $(PRODUCT_AAPT_CONFIG) $(PRODUCT_AAPT_PREF_CONFIG))
current_build_config := \
$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)-{$(aapt_config_list)}

View File

@ -1559,6 +1559,7 @@ endef
define add-assets-to-package
$(hide) $(AAPT) package -u $(PRIVATE_AAPT_FLAGS) \
$(addprefix -c , $(PRIVATE_PRODUCT_AAPT_CONFIG)) \
$(addprefix --preferred-configurations , $(PRIVATE_PRODUCT_AAPT_PREF_CONFIG)) \
$(addprefix -M , $(PRIVATE_ANDROID_MANIFEST)) \
$(addprefix -S , $(PRIVATE_RESOURCE_DIR)) \
$(addprefix -A , $(PRIVATE_ASSET_DIR)) \

View File

@ -227,6 +227,7 @@ $(R_file_stamp): $(resource_export_package)
# add-assets-to-package looks at PRODUCT_AAPT_CONFIG, but this target
# can't know anything about PRODUCT. Clear it out just for this target.
$(resource_export_package): PRIVATE_PRODUCT_AAPT_CONFIG :=
$(resource_export_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
$(resource_export_package): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT)
@echo "target Export Resources: $(PRIVATE_MODULE) ($@)"
$(create-empty-package)
@ -355,8 +356,10 @@ ifneq ($(TARGET_BUILD_APPS),)
endif
ifeq ($(LOCAL_AAPT_INCLUDE_ALL_RESOURCES),true)
$(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG :=
$(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
else
$(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG := $(PRODUCT_AAPT_CONFIG)
$(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := $(PRODUCT_AAPT_PREF_CONFIG)
endif
$(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
@echo "target Package: $(PRIVATE_MODULE) ($@)"

View File

@ -64,6 +64,7 @@ _product_var_list := \
PRODUCT_MODEL \
PRODUCT_LOCALES \
PRODUCT_AAPT_CONFIG \
PRODUCT_AAPT_PREF_CONFIG \
PRODUCT_PACKAGES \
PRODUCT_DEVICE \
PRODUCT_MANUFACTURER \

View File

@ -228,12 +228,14 @@ endif
# Add PRODUCT_LOCALES to PRODUCT_AAPT_CONFIG
PRODUCT_AAPT_CONFIG := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_CONFIG))
PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES) $(PRODUCT_AAPT_CONFIG)
PRODUCT_AAPT_PREF_CONFIG := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_PREF_CONFIG))
# Default to medium-density assets.
# (Can be overridden in the device config, e.g.: PRODUCT_AAPT_CONFIG += hdpi)
PRODUCT_AAPT_CONFIG := $(strip \
$(PRODUCT_AAPT_CONFIG) \
$(if $(filter %dpi,$(PRODUCT_AAPT_CONFIG)),,mdpi))
PRODUCT_AAPT_PREF_CONFIG := $(strip $(PRODUCT_AAPT_PREF_CONFIG))
# Everyone gets nodpi assets which are density-independent.
PRODUCT_AAPT_CONFIG += nodpi
@ -242,6 +244,8 @@ PRODUCT_AAPT_CONFIG += nodpi
comma := ,
PRODUCT_AAPT_CONFIG := \
$(subst $(space),$(comma),$(strip $(PRODUCT_AAPT_CONFIG)))
PRODUCT_AAPT_PREF_CONFIG := \
$(subst $(space),$(comma),$(strip $(PRODUCT_AAPT_PREF_CONFIG)))
PRODUCT_BRAND := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BRAND))