Merge "javadoc/droidoc: Don't add .jar files to sourcepath."
diff --git a/core/binary.mk b/core/binary.mk
index c2fa27c..97429c3 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -225,7 +225,15 @@
endif
ifneq ($(LOCAL_USE_VNDK),)
- my_cflags += -D__ANDROID_API__=__ANDROID_API_FUTURE__ -D__ANDROID_VNDK__
+ # Required VNDK version for vendor modules is BOARD_VNDK_VERSION.
+ my_vndk_version := $(BOARD_VNDK_VERSION)
+ ifeq ($(my_vndk_version),current)
+ # Build with current PLATFORM_VNDK_VERSION.
+ # If PLATFORM_VNDK_VERSION has a CODENAME, it will return
+ # __ANDROID_API_FUTURE__.
+ my_vndk_version := $(call codename-or-sdk-to-sdk,$(PLATFORM_VNDK_VERSION))
+ endif
+ my_cflags += -D__ANDROID_API__=$(my_vndk_version) -D__ANDROID_VNDK__
endif
ifndef LOCAL_IS_HOST_MODULE
diff --git a/core/config.mk b/core/config.mk
index 57d1128..9e04eea 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -843,6 +843,11 @@
$(error When PRODUCT_SHIPPING_API_LEVEL >= 28, TARGET_USES_64_BIT_BINDER must be true)
endif
endif
+ ifeq ($(PRODUCT_FULL_TREBLE),true)
+ ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE), true)
+ $(error When PRODUCT_SHIPPING_API_LEVEL >= 28, BOARD_BUILD_SYSTEM_ROOT_IMAGE must be true)
+ endif
+ endif
endif
endif
diff --git a/core/local_systemsdk.mk b/core/local_systemsdk.mk
index 6dab346..49085fd 100644
--- a/core/local_systemsdk.mk
+++ b/core/local_systemsdk.mk
@@ -25,7 +25,12 @@
ifneq (,$(filter JAVA_LIBRARIES APPS,$(LOCAL_MODULE_CLASS)))
ifndef LOCAL_SDK_VERSION
ifeq ($(_is_vendor_app),true)
- LOCAL_SDK_VERSION := system_current
+ ifeq (,$(findstring __auto_generated_rro,$(LOCAL_MODULE)))
+ # Runtime resource overlay for framework-res is exempted from building
+ # against System SDK.
+ # TODO(b/35859726): remove this exception
+ LOCAL_SDK_VERSION := system_current
+ endif
endif
endif
endif