Version LLNDK ABI dumps with VendorApiLevel
LLNDK version will be decoupled from SDK version. The ABI checker
loads the reference ABI dumps from
prebuilts/abi-dumps/vndk/<VendorApiLevel>.
Test: m libnativewindow
Bug: 314010764
Change-Id: I3e9f2cab58db0d1cc42f8c1abc13968617dacf14
diff --git a/android/config.go b/android/config.go
index d94a86f..ef8bb66 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1309,6 +1309,22 @@
return String(c.productVariables.VendorApiLevel)
}
+func (c *config) PrevVendorApiLevel() string {
+ vendorApiLevel, err := strconv.Atoi(c.VendorApiLevel())
+ if err != nil {
+ panic(fmt.Errorf("Cannot parse vendor API level %s to an integer: %s",
+ c.VendorApiLevel(), err))
+ }
+ if vendorApiLevel < 202404 || vendorApiLevel%100 != 4 {
+ panic("Unknown vendor API level " + c.VendorApiLevel())
+ }
+ // The version before trunk stable is 34.
+ if vendorApiLevel == 202404 {
+ return "34"
+ }
+ return strconv.Itoa(vendorApiLevel - 100)
+}
+
func (c *config) VendorApiLevelFrozen() bool {
return c.productVariables.GetBuildFlagBool("RELEASE_BOARD_API_LEVEL_FROZEN")
}