Rename LOCAL_USE_VNDK
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: Icfd1707953eba2e29044468ab6728b39d7998048
diff --git a/core/cc_prebuilt_internal.mk b/core/cc_prebuilt_internal.mk
index 000159a..e34e110 100644
--- a/core/cc_prebuilt_internal.mk
+++ b/core/cc_prebuilt_internal.mk
@@ -80,7 +80,7 @@
ifdef LOCAL_SDK_VERSION
my_link_type := native:ndk:$(my_ndk_stl_family):$(my_ndk_stl_link_type)
-else ifdef LOCAL_USE_VNDK
+else ifeq ($(call module-in-vendor-or-product),true)
_name := $(patsubst %.vendor,%,$(LOCAL_MODULE))
_name := $(patsubst %.product,%,$(LOCAL_MODULE))
ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),)
@@ -90,7 +90,7 @@
my_link_type := native:vndk_private
endif
else
- ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
+ ifeq ($(LOCAL_IN_PRODUCT),true)
my_link_type := native:product
else
my_link_type := native:vendor
@@ -139,8 +139,8 @@
# When compiling against API imported module, use API import stub libraries.
apiimport_postfix := .apiimport
-ifneq ($(LOCAL_USE_VNDK),)
- ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
+ifeq ($(call module-in-vendor-or-product),true)
+ ifeq ($(LOCAL_IN_PRODUCT),true)
apiimport_postfix := .apiimport.product
else
apiimport_postfix := .apiimport.vendor
@@ -158,8 +158,8 @@
endif #my_system_shared_libraries
ifdef my_shared_libraries
-ifdef LOCAL_USE_VNDK
- ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
+ifeq ($(call module-in-vendor-or-product),true)
+ ifeq ($(LOCAL_IN_PRODUCT),true)
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
$(if $(SPLIT_PRODUCT.SHARED_LIBRARIES.$(l)),$(l).product,$(l)))
else