From 8dd846c45f83bc697676132a994e8f59bcec57af Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Mon, 26 Nov 2018 14:32:40 -0800 Subject: [PATCH] Add RRO partition specification in Makefiles This adds support for overlays to be placed in the product and product_services partitions. LOCAL_VENDOR_MODULE := true #/vendor/overlay LOCAL_ODM_MODULE := true #/vendor/odm/overlay LOCAL_PRODUCT_MODULE := true #/system/product/overlay LOCAL_PRODUCT_SERVICES_MODULE := true # /system/product_services/overlay Bug: 110869880 Test: built overlay with different partitions and verified correct apk location Change-Id: I21f594e784a18cf59f4ff03c00e30b463ec85008 --- core/build_rro_package.mk | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/core/build_rro_package.mk b/core/build_rro_package.mk index ffefb9cbfe..0b4a0c4344 100644 --- a/core/build_rro_package.mk +++ b/core/build_rro_package.mk @@ -15,11 +15,23 @@ ifneq ($(LOCAL_SRC_FILES),) $(error runtime resource overlay package should not contain sources) endif -ifeq ($(LOCAL_RRO_THEME),) - LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/overlay +partition := +ifeq ($(LOCAL_ODM_MODULE),true) + partition := $(TARGET_OUT_ODM) +else ifeq ($(LOCAL_PRODUCT_MODULE),true) + partition := $(TARGET_OUT_PRODUCT) +else ifeq ($(LOCAL_PRODUCT_SERVICES_MODULE),true) + partition := $(TARGET_OUT_PRODUCT_SERVICES) else - LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/overlay/$(LOCAL_RRO_THEME) + partition := $(TARGET_OUT_VENDOR) endif -include $(BUILD_SYSTEM)/package.mk +ifeq ($(LOCAL_RRO_THEME),) + LOCAL_MODULE_PATH := $(partition)/overlay +else + LOCAL_MODULE_PATH := $(partition)/overlay/$(LOCAL_RRO_THEME) +endif +partition := + +include $(BUILD_SYSTEM)/package.mk