summaryrefslogtreecommitdiff
path: root/core/build_rro_package.mk
blob: ae528bddc40f4cab880221bfc39513a3a1d5cad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#############################################################################
## 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