Rework vndk detection
Instead of having a module define `use_vndk: true`, assume that we're
building with the VNDK if we're installed on the vendor partition, and
BOARD_VNDK_VERSION==current. This now matches our behavior in Make.
Once BOARD_VNDK_VERSION!=current, we'll need to disable modules that
need to otherwise compile against the VNDK, since we can only compile
against the current VNDK.
Test: build.ninja for aosp_arm is the same before/after
Test: Ensure there are no boards that set BOARD_VNDK_VERSION
Change-Id: If937fa7bdb119648137af52daebadf486163484b
diff --git a/android/config.go b/android/config.go
index 2361920..686eeb8 100644
--- a/android/config.go
+++ b/android/config.go
@@ -462,11 +462,11 @@
return "vendor"
}
-func (c *deviceConfig) VndkVersion() string {
+func (c *deviceConfig) CompileVndk() bool {
if c.config.ProductVariables.DeviceVndkVersion == nil {
- return ""
+ return false
}
- return *c.config.ProductVariables.DeviceVndkVersion
+ return *c.config.ProductVariables.DeviceVndkVersion == "current"
}
func (c *deviceConfig) BtConfigIncludeDir() string {