Update min_sdk_version from SdkSpec to ApiLevel
This relands aosp/2457063. The original change broke T and U since those
branches still contain soong modules of type (kind+level). Those soong
modules have been cleaned up now
Test: Used go/abtd to test T and U branches with this change
Bug: 208456999
Change-Id: I0ef7933c055f88cb512a02108f1173e51156ef1c
diff --git a/android/sdk.go b/android/sdk.go
index 8b23d63..63e0bbe 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -25,7 +25,7 @@
// minApiLevelForSdkSnapshot provides access to the min_sdk_version for MinApiLevelForSdkSnapshot
type minApiLevelForSdkSnapshot interface {
- MinSdkVersion(ctx EarlyModuleContext) SdkSpec
+ MinSdkVersion(ctx EarlyModuleContext) ApiLevel
}
// MinApiLevelForSdkSnapshot returns the ApiLevel of the min_sdk_version of the supplied module.
@@ -34,7 +34,7 @@
func MinApiLevelForSdkSnapshot(ctx EarlyModuleContext, module Module) ApiLevel {
minApiLevel := NoneApiLevel
if m, ok := module.(minApiLevelForSdkSnapshot); ok {
- minApiLevel = m.MinSdkVersion(ctx).ApiLevel
+ minApiLevel = m.MinSdkVersion(ctx)
}
if minApiLevel == NoneApiLevel {
// The default min API level is 1.