Merge "Skip passing "--product default" to aapt2" into main
This commit is contained in:
@@ -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.
|
// 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)
|
autogenerateRRO := proptools.Bool(a.appProperties.Generate_product_characteristics_rro)
|
||||||
hasProduct := android.PrefixInList(a.aaptProperties.Aaptflags, "--product")
|
hasProduct := android.PrefixInList(a.aaptProperties.Aaptflags, "--product")
|
||||||
if !autogenerateRRO && !hasProduct && len(ctx.Config().ProductAAPTCharacteristics()) > 0 {
|
characteristics := ctx.Config().ProductAAPTCharacteristics()
|
||||||
aaptLinkFlags = append(aaptLinkFlags, "--product", ctx.Config().ProductAAPTCharacteristics())
|
if !autogenerateRRO && !hasProduct && len(characteristics) > 0 && characteristics != "default" {
|
||||||
|
aaptLinkFlags = append(aaptLinkFlags, "--product", characteristics)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !Bool(a.aaptProperties.Aapt_include_all_resources) {
|
if !Bool(a.aaptProperties.Aapt_include_all_resources) {
|
||||||
|
Reference in New Issue
Block a user