link type of recovery variant of a vendor module should not be native:vendor

This CL fixes a bug that when a module is configured as 'vendor: true' &&
'recovery_available: true', the link type of the recovery variant of the
module is incorrectly set to 'native:vendor'. This was because,
androidmk.go emits 'LOCAL_PROPRIETARY_MODULE := true' whenever
Proprietary property is set to true, regardless of whether it is a
recovery variant or not. This in turn makes LOCAL_USE_VNDK := true for
the module which in turn causes the link type to be 'native:vendor'.

Fixing the bug by resetting the properties like Proprietary, Vendor,
Soc_specific, etc. for the recovery variants.

Bug: 113277544
Test: m -j (test added)
Change-Id: I5d6ae76e46ef8fcd9204d386d0809862a7b0ff7e
This commit is contained in:
Jiyong Park
2018-08-28 09:55:37 +09:00
parent 09664bd9a5
commit 5baac54d58
3 changed files with 27 additions and 2 deletions

View File

@@ -1067,6 +1067,16 @@ func (a *androidBaseContextImpl) ProductServicesSpecific() bool {
return a.kind == productServicesSpecificModule
}
// Makes this module a platform module, i.e. not specific to soc, device,
// product, or product_services.
func (a *ModuleBase) MakeAsPlatform() {
a.commonProperties.Vendor = boolPtr(false)
a.commonProperties.Proprietary = boolPtr(false)
a.commonProperties.Soc_specific = boolPtr(false)
a.commonProperties.Product_specific = boolPtr(false)
a.commonProperties.Product_services_specific = boolPtr(false)
}
func (a *androidModuleContext) InstallInData() bool {
return a.module.InstallInData()
}