Allow prebuilt APKs to specify LOCAL_INSTALLED_MODULE_STEM
We've got a case where two different prebuilt APKs need to have the same
apk name (but using a different LOCAL_MODULE_PATH).
Bug: 30470308
Change-Id: I5551e720d173623daa757c4c0aabc8e1a423ac38
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index d450373..b6727fa 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -85,8 +85,10 @@
ifeq ($(LOCAL_MODULE_CLASS),APPS)
LOCAL_BUILT_MODULE_STEM := package.apk
+ifndef LOCAL_INSTALLED_MODULE_STEM
LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE).apk
endif
+endif
ifneq ($(filter true no_debuglink,$(my_strip_module) $(my_pack_module_relocations)),)
ifdef LOCAL_IS_HOST_MODULE