Pass device characteristic information through to aapt.

A build configuration can define PRODUCT_CHARACTERISTICS, which is
a comma-separated list of device characteristics, for example
"nosdcard,grayscale".  This will be passed through to aapt with
the --product flag.

Change-Id: I902c034b2f2824dbd2d33449308ee08beeb09551
This commit is contained in:
Joe Onorato 2010-10-05 17:33:58 -04:00
parent 476d70aece
commit 700b88e145
4 changed files with 9 additions and 0 deletions

View file

@ -50,6 +50,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/android-info.txt)
$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm)
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

View file

@ -1367,6 +1367,7 @@ $(hide) $(AAPT) package -u $(PRIVATE_AAPT_FLAGS) \
$(addprefix -I , $(PRIVATE_AAPT_INCLUDES)) \
$(addprefix --min-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
$(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
$(addprefix --product , $(TARGET_AAPT_CHARACTERISTICS)) \
$(if $(filter --version-code,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-code , $(PLATFORM_SDK_VERSION))) \
$(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION))) \
$(addprefix --rename-manifest-package , $(PRIVATE_MANIFEST_PACKAGE_NAME)) \

View file

@ -68,6 +68,7 @@ _product_var_list := \
PRODUCT_MANUFACTURER \
PRODUCT_BRAND \
PRODUCT_PROPERTY_OVERRIDES \
PRODUCT_CHARACTERISTICS \
PRODUCT_COPY_FILES \
PRODUCT_OTA_PUBLIC_KEYS \
PRODUCT_PACKAGE_OVERLAYS \

View file

@ -253,6 +253,12 @@ ifndef PRODUCT_MANUFACTURER
PRODUCT_MANUFACTURER := unknown
endif
ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CHARACTERISTICS),)
TARGET_AAPT_CHARACTERISTICS := default
else
TARGET_AAPT_CHARACTERISTICS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CHARACTERISTICS))
endif
PRODUCT_DEFAULT_WIFI_CHANNELS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_WIFI_CHANNELS))