diff options
author | 2023-04-27 16:08:26 +0000 | |
---|---|---|
committer | 2023-04-28 16:23:53 +0000 | |
commit | fb6a1ee68bd7b17d1a8632082de88504dddc3540 (patch) | |
tree | 41b1262c1d6018cd377d537b7c4f196eeb8a3a1c /java/android_manifest.go | |
parent | d7b50181d9642a6a4e690e17732638fe3da252b3 (diff) |
target_sdk_version replacement should respect REL branches
Currently, target_sdk_version of MTS tests were being set to 10000 even
in release branches. This should only happen in active branches.
Test: Unit test
Test: aapt2 on CtsContentTestCases in udc-dev and verified
targetSdkVersion is 34
Bug: 279507428
Change-Id: Ib79318febc0f6e771b3679c0281a97357930ec56
Diffstat (limited to 'java/android_manifest.go')
-rw-r--r-- | java/android_manifest.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/android_manifest.go b/java/android_manifest.go index dbcf09830..f2ebfa6a2 100644 --- a/java/android_manifest.go +++ b/java/android_manifest.go @@ -63,9 +63,11 @@ func targetSdkVersionForManifestFixer(ctx android.ModuleContext, params Manifest // 2. The module is run as part of MTS, and should be testable on stable branches // Do not return 10000 if we are enforcing default targetSdkVersion and sdk has been finalised func shouldReturnFinalOrFutureInt(ctx android.ModuleContext, targetSdkVersionLevel android.ApiLevel, enforceDefaultTargetSdkVersion bool) bool { - if enforceDefaultTargetSdkVersion && ctx.Config().PlatformSdkFinal() { + // If this is a REL branch, do not return 10000 + if ctx.Config().PlatformSdkFinal() { return false } + // If this a module targeting an unreleased SDK (MTS or unbundled builds), return 10000 return targetSdkVersionLevel.IsPreview() && (ctx.Config().UnbundledBuildApps() || includedInMts(ctx.Module())) } |