Check conformity of VNDK version

Allow BOARD_VNDK_VERSION=<version> only if the prebuilt VNDK for
the <version> is provided.

If PRODUCT_EXTRA_VNDK_VERSIONS is set, all the versions in the list
will be checked as well.

Bug: 38304393
Bug: 65377115
Bug: 68123344
Test: Set BOARD_VNDK_VERSION := current and check build
Test: Set PRODUCT_EXTRA_VNDK_VERSIONS := 27 and check if it returns
      error when prebuilts/vndk/v27/Android.mk is not provided

Change-Id: I2e43d71f1ea3717ab8c45de84c926ecc43193307
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 3ab6fbd..f1f1e09 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -112,6 +112,7 @@
 $(call add_json_bool, DevicePrefer32BitExecutables,      $(filter true,$(TARGET_PREFER_32_BIT_EXECUTABLES)))
 $(call add_json_val,  DeviceUsesClang,                   $(if $(USE_CLANG_PLATFORM_BUILD),$(USE_CLANG_PLATFORM_BUILD),false))
 $(call add_json_str,  DeviceVndkVersion,                 $(BOARD_VNDK_VERSION))
+$(call add_json_list, ExtraVndkVersions,                 $(PRODUCT_EXTRA_VNDK_VERSIONS))
 $(call add_json_bool, Malloc_not_svelte,                 $(call invert_bool,$(filter true,$(MALLOC_SVELTE))))
 $(call add_json_str,  Override_rs_driver,                $(OVERRIDE_RS_DRIVER))
 $(call add_json_bool, Treble,                            $(filter true,$(PRODUCT_FULL_TREBLE)))