diff --git a/apex/builder.go b/apex/builder.go index 5e0baf46b..022353f60 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -383,6 +383,16 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { targetSdkVersion := ctx.Config().DefaultAppTargetSdk() minSdkVersion := ctx.Config().DefaultAppTargetSdk() + + if proptools.Bool(a.properties.Legacy_android10_support) { + if !java.UseApiFingerprint(ctx, targetSdkVersion) { + targetSdkVersion = "29" + } + if !java.UseApiFingerprint(ctx, minSdkVersion) { + minSdkVersion = "29" + } + } + if java.UseApiFingerprint(ctx, targetSdkVersion) { targetSdkVersion += fmt.Sprintf(".$$(cat %s)", java.ApiFingerprintPath(ctx).String()) implicitInputs = append(implicitInputs, java.ApiFingerprintPath(ctx))