'vendor_available: *' will not create product variant

With this patch, `vendor_available: true` will no longer creates
product variant. Instead, modules need to set `product_available:
true` if they have to be available to product vanriant.
If both properties are defined for VNDKs, they must have the same
values.

Bug: 150902910
Test: m nothing
Change-Id: I28fb6886e6114583227a31151136627c8516ac9c
This commit is contained in:
Justin Yun
2020-10-29 18:24:11 +09:00
parent 74c8436ce0
commit 6977e8a80c
8 changed files with 288 additions and 64 deletions

View File

@@ -101,8 +101,7 @@ func (g *GenruleExtraProperties) ExtraImageVariations(ctx android.BaseModuleCont
return variants
}
// TODO(b/150902910): vendor_available will not create product variant. Remove Bool(g.Vendor_available)
if Bool(g.Vendor_available) || Bool(g.Product_available) || ctx.ProductSpecific() {
if Bool(g.Product_available) || ctx.ProductSpecific() {
variants = append(variants, ProductVariationPrefix+ctx.DeviceConfig().PlatformVndkVersion())
if vndkVersion := ctx.DeviceConfig().ProductVndkVersion(); vndkVersion != "current" {
variants = append(variants, ProductVariationPrefix+vndkVersion)