Merge "Avoid targeting Java 9 for targets with SDK version up to 29." am: 3f3a70c0ec

am: 4494c12c46

Change-Id: I3b351483e18c6ffd9fb5952148bd17c8ed31cbbd
This commit is contained in:
Pete Gillin 2019-05-21 03:42:36 -07:00 committed by android-build-merger
commit 4052fab263
1 changed files with 1 additions and 1 deletions

View File

@ -854,7 +854,7 @@ func getJavaVersion(ctx android.ModuleContext, javaVersion string, sdkContext sd
ret = javaVersion
} else if ctx.Device() && sdk <= 23 {
ret = "1.7"
} else if ctx.Device() && sdk <= 28 || !ctx.Config().TargetOpenJDK9() {
} else if ctx.Device() && sdk <= 29 || !ctx.Config().TargetOpenJDK9() {
ret = "1.8"
} else if ctx.Device() && sdkContext.sdkVersion() != "" && sdk == android.FutureApiLevel {
// TODO(ccross): once we generate stubs we should be able to use 1.9 for sdk_version: "current"