Merge "Ensure that BOARD_VNDK_VERSION is current" into oc-dev
diff --git a/core/binary.mk b/core/binary.mk
index 6b4fa5a..32f8ebe 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -112,12 +112,12 @@
   # that for the generated libraries. Clip the API level to the minimum where
   # appropriate.
   ifdef LOCAL_USE_VNDK
-    my_ndk_api := $(BOARD_VNDK_VERSION)
+    my_ndk_api := current
   else
     my_ndk_api := $(LOCAL_SDK_VERSION)
-  endif
-  ifneq ($(my_ndk_api),current)
+    ifneq ($(my_ndk_api),current)
       my_ndk_api := $(call math_max,$(my_ndk_api),$(my_min_sdk_version))
+    endif
   endif
 
   my_ndk_api_def := $(my_ndk_api)
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 880d310..67ac751 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -255,6 +255,13 @@
   endif
 endif
 
+# Check BOARD_VNDK_VERSION
+ifdef BOARD_VNDK_VERSION
+  ifneq ($(BOARD_VNDK_VERSION),current)
+    $(error BOARD_VNDK_VERSION: Only "current" is implemented)
+  endif
+endif
+
 # ---------------------------------------------------------------
 # Set up configuration for target machine.
 # The following must be set: