Define __ANDROID_VENDOR_API__
cc modules can use __ANDROID_VENDOR_API__ to read BOARD_API_LEVEL
that is the API level of the vendor surface.
Bug: 313822931
Test: check ninja commands to have -D__ANDROID_VENDOR_API__=<version>
Change-Id: Iceb5918cbfce0f24929d02d7e3caf1e9942b88e8
diff --git a/android/config.go b/android/config.go
index a69adc3..3d341da 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1425,6 +1425,10 @@
return !Bool(c.productVariables.KeepVndk)
}
+func (c *config) VendorApiLevel() string {
+ return String(c.productVariables.VendorApiLevel)
+}
+
func (c *deviceConfig) Arches() []Arch {
var arches []Arch
for _, target := range c.config.Targets[Android] {
diff --git a/android/variable.go b/android/variable.go
index 307deaf..0e7a173 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -226,6 +226,8 @@
DeviceMaxPageSizeSupported *string `json:",omitempty"`
DevicePageSizeAgnostic *bool `json:",omitempty"`
+ VendorApiLevel *string `json:",omitempty"`
+
RecoverySnapshotVersion *string `json:",omitempty"`
DeviceSecondaryArch *string `json:",omitempty"`