Merge "build_image still too aggressive with right sizing (part troix)"
diff --git a/core/generate_enforce_rro.mk b/core/generate_enforce_rro.mk
index 62a8c8d..c88c779 100644
--- a/core/generate_enforce_rro.mk
+++ b/core/generate_enforce_rro.mk
@@ -27,4 +27,10 @@
LOCAL_AAPT_FLAGS += --auto-add-overlay
LOCAL_RESOURCE_DIR := $(enforce_rro_source_overlays)
+ifeq (framework-res__auto_generated_rro,$(enforce_rro_module))
+LOCAL_PRIVATE_PLATFORM_APIS := true
+else
+LOCAL_SDK_VERSION := current
+endif
+
include $(BUILD_RRO_PACKAGE)
diff --git a/core/local_systemsdk.mk b/core/local_systemsdk.mk
index 49085fd..7acb57a 100644
--- a/core/local_systemsdk.mk
+++ b/core/local_systemsdk.mk
@@ -25,7 +25,7 @@
ifneq (,$(filter JAVA_LIBRARIES APPS,$(LOCAL_MODULE_CLASS)))
ifndef LOCAL_SDK_VERSION
ifeq ($(_is_vendor_app),true)
- ifeq (,$(findstring __auto_generated_rro,$(LOCAL_MODULE)))
+ ifeq (,$(filter framework-res__auto_generated_rro,$(LOCAL_MODULE)))
# Runtime resource overlay for framework-res is exempted from building
# against System SDK.
# TODO(b/35859726): remove this exception