diff options
Diffstat (limited to 'java/droidstubs.go')
-rw-r--r-- | java/droidstubs.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/java/droidstubs.go b/java/droidstubs.go index c21592518..b30c8448a 100644 --- a/java/droidstubs.go +++ b/java/droidstubs.go @@ -564,7 +564,15 @@ func (d *Droidstubs) apiLevelsAnnotationsFlags(ctx android.ModuleContext, cmd *a }) } if apiVersions != nil { - cmd.FlagWithArg("--current-version ", ctx.Config().PlatformSdkVersion().String()) + // We are migrating from a single API level to major.minor + // versions and PlatformSdkVersionFull is not yet set in all + // release configs. If it is not set, fall back on the single + // API level. + if fullSdkVersion := ctx.Config().PlatformSdkVersionFull(); len(fullSdkVersion) > 0 { + cmd.FlagWithArg("--current-version ", fullSdkVersion) + } else { + cmd.FlagWithArg("--current-version ", ctx.Config().PlatformSdkVersion().String()) + } cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename()) cmd.FlagWithInput("--apply-api-levels ", apiVersions) } |