Generate vintf without VNDK version am: 9f24a721b2

Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/2949387

Change-Id: Id9305b806b531bb190f776a3402dec3cd21cf63b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/vintfdata/Android.mk b/vintfdata/Android.mk
index 9af19ec..6a5fe72 100644
--- a/vintfdata/Android.mk
+++ b/vintfdata/Android.mk
@@ -33,11 +33,13 @@
 endif
 
 # VNDK Version in device compatibility matrix and framework manifest
+ifeq ($(KEEP_VNDK),true)
 ifeq ($(BOARD_VNDK_VERSION),current)
 VINTF_VNDK_VERSION := $(PLATFORM_VNDK_VERSION)
 else
 VINTF_VNDK_VERSION := $(BOARD_VNDK_VERSION)
 endif
+endif
 
 # Device Compatibility Matrix
 ifdef DEVICE_MATRIX_FILE
@@ -59,18 +61,29 @@
 
 # VNDK is no longer a dependency for vendor version 35 and beyond
 $(GEN): PRIVATE_VINTF_VNDK_VERSION :=
+ifdef VINTF_VNDK_VERSION
 ifeq ($(call math_is_number,$(VINTF_VNDK_VERSION)),true)
 ifeq ($(call math_lt_or_eq,$(VINTF_VNDK_VERSION),34),true)
 $(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION)
 endif
 endif
+endif
 $(GEN): PRIVATE_DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_INPUT_FILE)
+
+ifeq ($(PRIVATE_VINTF_VNDK_VERSION),)
+$(GEN): $(DEVICE_MATRIX_INPUT_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
+	BOARD_SYSTEMSDK_VERSIONS="$(BOARD_SYSTEMSDK_VERSIONS)" \
+		$(HOST_OUT_EXECUTABLES)/assemble_vintf \
+		-i $(call normalize-path-list,$(PRIVATE_DEVICE_MATRIX_INPUT_FILE)) \
+		-o $@
+else
 $(GEN): $(DEVICE_MATRIX_INPUT_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
 	REQUIRED_VNDK_VERSION=$(PRIVATE_VINTF_VNDK_VERSION) \
 	BOARD_SYSTEMSDK_VERSIONS="$(BOARD_SYSTEMSDK_VERSIONS)" \
 		$(HOST_OUT_EXECUTABLES)/assemble_vintf \
 		-i $(call normalize-path-list,$(PRIVATE_DEVICE_MATRIX_INPUT_FILE)) \
 		-o $@
+endif
 
 LOCAL_PREBUILT_MODULE_FILE := $(GEN)
 include $(BUILD_PREBUILT)
@@ -133,11 +146,19 @@
 $(GEN): PRIVATE_SYSTEM_EXT_MANIFEST_FILES := $(SYSTEM_EXT_MANIFEST_INPUT_FILES)
 $(GEN): PRIVATE_PROVIDED_VNDK_VERSIONS := \
   $(sort $(VINTF_VNDK_VERSION) $(PRODUCT_EXTRA_VNDK_VERSIONS))
+
+ifeq ($(PRIVATE_PROVIDED_VNDK_VERSIONS),)
+$(GEN): $(SYSTEM_EXT_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
+	$(HOST_OUT_EXECUTABLES)/assemble_vintf \
+		-i $(call normalize-path-list,$(PRIVATE_SYSTEM_EXT_MANIFEST_FILES)) \
+		-o $@
+else
 $(GEN): $(SYSTEM_EXT_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
 	PROVIDED_VNDK_VERSIONS="$(PRIVATE_PROVIDED_VNDK_VERSIONS)" \
 	$(HOST_OUT_EXECUTABLES)/assemble_vintf \
 		-i $(call normalize-path-list,$(PRIVATE_SYSTEM_EXT_MANIFEST_FILES)) \
 		-o $@
+endif
 
 LOCAL_PREBUILT_MODULE_FILE := $(GEN)
 include $(BUILD_PREBUILT)