Exempt framework-res from UseApiFingerprint

Generating the API fingerpring depends on framework-res, so the
fingerprint cannot be embedded into framework-res.  Hardcode an
exemption to UseApiFingerprint.

Bug: 181978889
Test: TARGET_BUILD_VARIANT=user UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true vendor/google/build/build_mainline_modules.sh
Change-Id: I621f36d5eb157dd97baa132ff109b4df791eedcc
This commit is contained in:
Colin Cross 2021-03-05 11:51:56 -08:00
parent b48f9aefea
commit 2669e7edf0
1 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext
if err != nil {
ctx.ModuleErrorf("invalid targetSdkVersion: %s", err)
}
if UseApiFingerprint(ctx) {
if UseApiFingerprint(ctx) && ctx.ModuleName() != "framework-res" {
targetSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
deps = append(deps, ApiFingerprintPath(ctx))
}
@ -100,7 +100,7 @@ func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext
if err != nil {
ctx.ModuleErrorf("invalid minSdkVersion: %s", err)
}
if UseApiFingerprint(ctx) {
if UseApiFingerprint(ctx) && ctx.ModuleName() != "framework-res" {
minSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
deps = append(deps, ApiFingerprintPath(ctx))
}