Install runtime resource overlay without subdir.

Runtime resource overlay is a bare APK with just the overlaid
resources. There is no need for additional subdir.
See http://go/sku-colors.

Bug: 31692079
Change-Id: Iff3d58f941e764a7be3ec04cafeefd592bd8b944
This commit is contained in:
Jakub Adamek 2016-10-03 09:56:16 +01:00
parent 932a406948
commit a08a1015bc
4 changed files with 29 additions and 1 deletions

View File

@ -210,7 +210,10 @@ ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
# Apk and its attachments reside in its own subdir.
ifeq ($(LOCAL_MODULE_CLASS),APPS)
# framework-res.apk doesn't like the additional layer.
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
# Neither do Runtime Resource Overlay apks, which contain just the overlaid resources.
else ifeq ($(LOCAL_IS_RUNTIME_RESOURCE_OVERLAY),true)
else
my_module_path := $(my_module_path)/$(LOCAL_MODULE)
endif
endif

22
core/build_rro_package.mk Normal file
View File

@ -0,0 +1,22 @@
#########################################################################
## Standard rules for installing runtime resouce overlay APKs.
##
## Set LOCAL_RRO_SKU to the SKU name if the package should apply only to
## a particular SKU as set by ro.boot.vendor.overlay.sku system property.
##
#########################################################################
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
ifneq ($(LOCAL_SRC_FILES),)
$(error runtime resource overlay package should not contain sources)
endif
ifeq (S(LOCAL_RRO_SKU),)
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/overlay
else
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/overlay/$(LOCAL_RRO_SKU)
endif
include $(BUILD_SYSTEM)/package.mk

View File

@ -363,6 +363,8 @@ LOCAL_CLANG_64:=
LOCAL_INIT_RC_32:=
LOCAL_INIT_RC_64:=
LOCAL_JAVA_LANGUAGE_VERSION:=
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY:=
LOCAL_RRO_SKU:=
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.

View File

@ -85,6 +85,7 @@ BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk
BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk
BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk
BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk
BUILD_RRO_PACKAGE:= $(BUILD_SYSTEM)/build_rro_package.mk
BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk
BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk
BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk