Introduce a default density ('mdpi') for all device builds.
This is done by appending "mdpi" (medium density or 160 dpi, which is what we've been using so far on dream etc.) to PRODUCT_LOCALES if no other dpi is found there. (PRODUCT_LOCALES is then sent as a configuration parameter to aapt to determine which resources should be included in the build.) With this change, each build will now include only one density of any given asset. For example, if there exists drawable-hdpi/foo.png drawable-mdpi/foo.png ...then the build will include *only* drawable-mdpi/foo.png, unless the density is overridden in the build's own device spec: PRODUCT_LOCALES += hdpi ...in which case the build will include only drawable-hdpi/foo.png.
This commit is contained in:
parent
f76b9c87b1
commit
c6646c9ac4
|
@ -193,6 +193,12 @@ ifneq (,$(extra_locales))
|
|||
extra_locales :=
|
||||
endif
|
||||
|
||||
# Default to medium-density assets.
|
||||
# (Can be overridden in the device config, e.g.: PRODUCT_LOCALES += hdpi)
|
||||
PRODUCT_LOCALES := $(strip \
|
||||
$(PRODUCT_LOCALES) \
|
||||
$(if $(filter %dpi,$(PRODUCT_LOCALES)),,mdpi))
|
||||
|
||||
# Assemble the list of options.
|
||||
PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES)
|
||||
|
||||
|
|
Loading…
Reference in New Issue