Exempt RRO from the restriction on API level

As auto generated RRO, an arbitrary RRO needs to be exempted as well.
It is okay because RRO packages can access only resource defined in
public.xml, when RRO packages want to refer other package's resource.

Bug: 152926556
Test: build RRO packages
Test: check if product/vendor app still can't use hidden APIs
Merged-In: I8dc2922af5eb5c87ccd97d1b8d080b3ed48cf9a6
Change-Id: Ief10b3535d4eb9f6607cac31cba1b4d3e081efd0
(cherry picked from commit 07a44f48dcd0825cd3105b7395744da678199b08)
gugelfrei-debug
Jeongik Cha 4 years ago
parent 2ca6aa0f4e
commit 62b9892916

@ -15,7 +15,7 @@
#
ifdef BOARD_SYSTEMSDK_VERSIONS
# Apps and jars in vendor or odm partition are forced to build against System SDK.
# Apps and jars in vendor, product or odm partition are forced to build against System SDK.
_cannot_use_platform_apis :=
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
# Note: no need to check LOCAL_MODULE_PATH* since LOCAL_[VENDOR|ODM|OEM]_MODULE is already
@ -29,9 +29,9 @@ ifdef BOARD_SYSTEMSDK_VERSIONS
ifneq (,$(filter JAVA_LIBRARIES APPS,$(LOCAL_MODULE_CLASS)))
ifndef LOCAL_SDK_VERSION
ifeq ($(_cannot_use_platform_apis),true)
ifeq (,$(findstring __auto_generated_rro_,$(LOCAL_MODULE)))
ifeq (,$(LOCAL_IS_RUNTIME_RESOURCE_OVERLAY))
# Runtime resource overlays are exempted from building against System SDK.
# TODO(b/35859726): remove this exception
# TODO(b/155027019): remove this, after no product/vendor apps rely on this behavior.
LOCAL_SDK_VERSION := system_current
endif
endif

Loading…
Cancel
Save