Native modules installed to recovery are marked as native:recovery
This fixes a bug that platform module (native:platform) can link to a
recovery module due to the fact that the recovery module is also labeled
as native:platform. Fixing the bug by setting the link type correctly to
native:recovery.
Bug: 113277544
Test: m -j
Change-Id: I88fe0a9d958f2269cf9f9ebc205b2da8c6a761a5
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 2f3c7a4..78da421 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -188,6 +188,8 @@
else
my_link_type := native:vendor
endif
+else ifneq ($(filter $(TARGET_RECOVERY_OUT)/%,$(LOCAL_MODULE_PATH)),)
+my_link_type := native:recovery
else
my_link_type := native:platform
endif