Convert more versions in config to ApiLevel.

The test case I removed is invalid. The codename has had its int
assigned, but the config claims it is not final.

If this ever does need to be supported it's just a matter of making
sure the Q -> 29 mapping (or whatever) in the finalized codenames map
in android/api_levels.go.

Test: treehugger
Bug: http://b/154667674
Change-Id: I4f42ec2fd4a37750519ee3937938a1c65b6bb1e8
This commit is contained in:
Dan Albert
2020-07-23 17:32:15 -07:00
parent 0b176c8038
commit 4f378d75aa
11 changed files with 41 additions and 49 deletions

View File

@@ -533,9 +533,9 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
optFlags = append(optFlags, "--android_manifest "+androidManifestFile.String())
}
targetSdkVersion := ctx.Config().DefaultAppTargetSdk()
targetSdkVersion := ctx.Config().DefaultAppTargetSdk(ctx).String()
// TODO(b/157078772): propagate min_sdk_version to apexer.
minSdkVersion := ctx.Config().DefaultAppTargetSdk()
minSdkVersion := ctx.Config().DefaultAppTargetSdk(ctx).String()
moduleMinSdkVersion := a.minSdkVersion(ctx)
if moduleMinSdkVersion.EqualTo(android.SdkVersion_Android10) {