Jakub Adamek | 3451f24 | 2016-10-19 11:42:51 +0100 | [diff] [blame] | 1 | ############################################################################# |
Jakub Adamek | a08a101 | 2016-10-03 09:56:16 +0100 | [diff] [blame] | 2 | ## Standard rules for installing runtime resouce overlay APKs. |
| 3 | ## |
Jakub Adamek | 3451f24 | 2016-10-19 11:42:51 +0100 | [diff] [blame] | 4 | ## Set LOCAL_RRO_THEME to the theme name if the package should apply only to |
| 5 | ## a particular theme as set by ro.boot.vendor.overlay.theme system property. |
Jakub Adamek | a08a101 | 2016-10-03 09:56:16 +0100 | [diff] [blame] | 6 | ## |
Jakub Adamek | 3451f24 | 2016-10-19 11:42:51 +0100 | [diff] [blame] | 7 | ## If LOCAL_RRO_THEME is not set, the package will apply always, independent |
| 8 | ## of themes. |
| 9 | ## |
| 10 | ############################################################################# |
Jakub Adamek | a08a101 | 2016-10-03 09:56:16 +0100 | [diff] [blame] | 11 | |
| 12 | LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true |
| 13 | |
| 14 | ifneq ($(LOCAL_SRC_FILES),) |
| 15 | $(error runtime resource overlay package should not contain sources) |
| 16 | endif |
| 17 | |
Ryan Mitchell | 8dd846c | 2018-11-26 14:32:40 -0800 | [diff] [blame] | 18 | partition := |
joker.yang | a75c9a5 | 2019-04-03 09:10:37 +0800 | [diff] [blame] | 19 | ifeq ($(strip $(LOCAL_ODM_MODULE)),true) |
Ryan Mitchell | 8dd846c | 2018-11-26 14:32:40 -0800 | [diff] [blame] | 20 | partition := $(TARGET_OUT_ODM) |
joker.yang | a75c9a5 | 2019-04-03 09:10:37 +0800 | [diff] [blame] | 21 | else ifeq ($(strip $(LOCAL_VENDOR_MODULE)),true) |
Anton Hansson | 95958ee | 2019-02-06 11:54:40 +0000 | [diff] [blame] | 22 | partition := $(TARGET_OUT_VENDOR) |
Justin Yun | 6151e3f | 2019-06-25 15:58:13 +0900 | [diff] [blame] | 23 | else ifeq ($(strip $(LOCAL_SYSTEM_EXT_MODULE)),true) |
| 24 | partition := $(TARGET_OUT_SYSTEM_EXT) |
Jakub Adamek | a08a101 | 2016-10-03 09:56:16 +0100 | [diff] [blame] | 25 | else |
Anton Hansson | 95958ee | 2019-02-06 11:54:40 +0000 | [diff] [blame] | 26 | partition := $(TARGET_OUT_PRODUCT) |
Jakub Adamek | a08a101 | 2016-10-03 09:56:16 +0100 | [diff] [blame] | 27 | endif |
| 28 | |
Ryan Mitchell | 8dd846c | 2018-11-26 14:32:40 -0800 | [diff] [blame] | 29 | ifeq ($(LOCAL_RRO_THEME),) |
| 30 | LOCAL_MODULE_PATH := $(partition)/overlay |
| 31 | else |
| 32 | LOCAL_MODULE_PATH := $(partition)/overlay/$(LOCAL_RRO_THEME) |
| 33 | endif |
Jakub Adamek | a08a101 | 2016-10-03 09:56:16 +0100 | [diff] [blame] | 34 | |
Ryan Mitchell | 15e6042 | 2019-12-17 12:19:15 -0800 | [diff] [blame] | 35 | # Do not remove resources without default values nor dedupe resource |
| 36 | # configurations with the same value |
| 37 | LOCAL_AAPT_FLAGS += \ |
| 38 | --no-resource-deduping \ |
| 39 | --no-resource-removal |
| 40 | |
Ryan Mitchell | 8dd846c | 2018-11-26 14:32:40 -0800 | [diff] [blame] | 41 | partition := |
| 42 | |
| 43 | include $(BUILD_SYSTEM)/package.mk |