Do not add '.product' suffix for product_specific module

When a module has both 'product_specific: true' and
'vendor_available: true', the module does not have core variant but
have product and vendor variant modules. As the module generated
multiple variants, the names of the modules have the variant name
suffix. However, it did not create the module with the base module
name because it does not have core variant.

As the base module, in this case, is the product variant, use the
base module name for the product variant without adding the
'.product' suffix to it.

Bug: 161913599
Test: m hidl_test_product@2.0-adapter-helper
Change-Id: I904b43744579a6e89cecbc2e529122eaa8b14cae
This commit is contained in:
Justin Yun
2021-02-03 19:43:02 +09:00
parent cbca373efa
commit d00f5ca1df
2 changed files with 6 additions and 1 deletions

View File

@@ -1535,6 +1535,11 @@ func (c *Module) getNameSuffixWithVndkVersion(ctx android.ModuleContext) string
var vndkVersion string
var nameSuffix string
if c.InProduct() {
if c.ProductSpecific() {
// If the module is product specific with 'product_specific: true',
// do not add a name suffix because it is a base module.
return ""
}
vndkVersion = ctx.DeviceConfig().ProductVndkVersion()
nameSuffix = productSuffix
} else {