Skip passing "--product default" to aapt2

Because
1) it has no effect.
2) it will simplify build commands, which will minimize differences
   among targets using generate_product_characteristics_rro

Bug: 322932641
Test: TH
Change-Id: I16afae597038da7489989483f8c926916d207df5
This commit is contained in:
Inseob Kim
2024-02-13 12:56:46 +09:00
parent 997951dd96
commit 10af6edc52

View File

@@ -472,8 +472,9 @@ func (a *AndroidApp) aaptBuildActions(ctx android.ModuleContext) {
// Add TARGET_AAPT_CHARACTERISTICS values to AAPT link flags if they exist and --product flags were not provided.
autogenerateRRO := proptools.Bool(a.appProperties.Generate_product_characteristics_rro)
hasProduct := android.PrefixInList(a.aaptProperties.Aaptflags, "--product")
if !autogenerateRRO && !hasProduct && len(ctx.Config().ProductAAPTCharacteristics()) > 0 {
aaptLinkFlags = append(aaptLinkFlags, "--product", ctx.Config().ProductAAPTCharacteristics())
characteristics := ctx.Config().ProductAAPTCharacteristics()
if !autogenerateRRO && !hasProduct && len(characteristics) > 0 && characteristics != "default" {
aaptLinkFlags = append(aaptLinkFlags, "--product", characteristics)
}
if !Bool(a.aaptProperties.Aapt_include_all_resources) {