15e6042b29
Resource configs should not be deduped when building RROs since it would be impossible to override some resource configs with the same value as the default config. Also, aapt2 removes resources that do not have default configurations. If an overlay attempts to overlay a non-default configuration without overlaying the default, the resource will be removed and the value will not be overlaid at all. Bug: 146227008 Test: m-j Change-Id: I1465b599cbf7f464d1b5b75a87e7dafa2cf734b0
43 lines
1.3 KiB
Makefile
43 lines
1.3 KiB
Makefile
#############################################################################
|
||
## Standard rules for installing runtime resouce overlay APKs.
|
||
##
|
||
## Set LOCAL_RRO_THEME to the theme name if the package should apply only to
|
||
## a particular theme as set by ro.boot.vendor.overlay.theme system property.
|
||
##
|
||
## If LOCAL_RRO_THEME is not set, the package will apply always, independent
|
||
## of themes.
|
||
##
|
||
#############################################################################
|
||
|
||
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
|
||
|
||
ifneq ($(LOCAL_SRC_FILES),)
|
||
$(error runtime resource overlay package should not contain sources)
|
||
endif
|
||
|
||
partition :=
|
||
ifeq ($(strip $(LOCAL_ODM_MODULE)),true)
|
||
partition := $(TARGET_OUT_ODM)
|
||
else ifeq ($(strip $(LOCAL_VENDOR_MODULE)),true)
|
||
partition := $(TARGET_OUT_VENDOR)
|
||
else ifeq ($(strip $(LOCAL_SYSTEM_EXT_MODULE)),true)
|
||
partition := $(TARGET_OUT_SYSTEM_EXT)
|
||
else
|
||
partition := $(TARGET_OUT_PRODUCT)
|
||
endif
|
||
|
||
ifeq ($(LOCAL_RRO_THEME),)
|
||
LOCAL_MODULE_PATH := $(partition)/overlay
|
||
else
|
||
LOCAL_MODULE_PATH := $(partition)/overlay/$(LOCAL_RRO_THEME)
|
||
endif
|
||
|
||
# Do not remove resources without default values nor dedupe resource
|
||
# configurations with the same value
|
||
LOCAL_AAPT_FLAGS += \
|
||
--no-resource-deduping \
|
||
--no-resource-removal
|
||
|
||
partition :=
|
||
|
||
include $(BUILD_SYSTEM)/package.mk
|