For Q APEXes default target_sdk_version and min_sdk_version to 29

This will allow installing Q launched APEXes built from master on Q
devices.

Test: m com.android.conscrypt
Test: see another CL in topic
Test: lunch blueline-userdebug
Test: TARGET_BUILD_APPS=com.android.resolv m
Test: installed on Q blueline, verified installation succeeded
Bug: 149733822
Change-Id: Ia863b5701716ef4022b470ee758368ea4fffb1d4
This commit is contained in:
Nikita Ioffe 2020-02-20 00:43:27 +00:00
parent b67fdeaca4
commit db10c13bdf
1 changed files with 10 additions and 0 deletions

View File

@ -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))