Merge "Updating platform SDK version for R" into rvc-dev-plus-aosp
diff --git a/core/app_prebuilt_internal.mk b/core/app_prebuilt_internal.mk
index 61e13e9..ab574b3 100644
--- a/core/app_prebuilt_internal.mk
+++ b/core/app_prebuilt_internal.mk
@@ -172,6 +172,12 @@
   $(built_module): PRIVATE_CERTIFICATE_LINEAGE := $(LOCAL_CERTIFICATE_LINEAGE)
 endif
 
+ifneq ($(LOCAL_MODULE_STEM),)
+  PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE_STEM)
+else
+  PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE)
+endif
+
 include $(BUILD_SYSTEM)/app_certificate_validate.mk
 
 # Set a actual_partition_tag (calculated in base_rules.mk) for the package.
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 62dac99..034a36e 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -694,6 +694,12 @@
 PACKAGES.$(LOCAL_PACKAGE_NAME).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
 PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_FILES := $(all_resources)
 
+ifneq ($(LOCAL_MODULE_STEM),)
+  PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE_STEM)
+else
+  PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE)
+endif
+
 PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME)
 
 # Reset internal variables.