For modules that provide AndroidMkInfoProvider, only access modules'
internal data through providers.
Eventually all module should be converted to provide this provider, and
then we can change it to use VisitAllModuleProxies instead of
VisitAllModules.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I83b55c20f971c619fa39613c1fb1cb525f56d20e
diff --git a/android/module.go b/android/module.go
index f359e9f..996c64e 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1922,6 +1922,23 @@
// The primary licenses property, may be nil, records license metadata for the module.
PrimaryLicensesProperty applicableLicensesProperty
Owner string
+ Vendor bool
+ Proprietary bool
+ SocSpecific bool
+ ProductSpecific bool
+ SystemExtSpecific bool
+ DeviceSpecific bool
+ // When set to true, this module is not installed to the full install path (ex: under
+ // out/target/product/<name>/<partition>). It can be installed only to the packaging
+ // modules like android_filesystem.
+ NoFullInstall bool
+ InVendorRamdisk bool
+ ExemptFromRequiredApplicableLicensesProperty bool
+ RequiredModuleNames []string
+ HostRequiredModuleNames []string
+ TargetRequiredModuleNames []string
+ VintfFragmentModuleNames []string
+ Dists []Dist
}
type ApiLevelOrPlatform struct {
@@ -2266,7 +2283,21 @@
SkipInstall: m.commonProperties.SkipInstall,
Host: m.Host(),
PrimaryLicensesProperty: m.primaryLicensesProperty,
- Owner: m.Owner(),
+ Owner: m.module.Owner(),
+ SocSpecific: Bool(m.commonProperties.Soc_specific),
+ Vendor: Bool(m.commonProperties.Vendor),
+ Proprietary: Bool(m.commonProperties.Proprietary),
+ ProductSpecific: Bool(m.commonProperties.Product_specific),
+ SystemExtSpecific: Bool(m.commonProperties.System_ext_specific),
+ DeviceSpecific: Bool(m.commonProperties.Device_specific),
+ NoFullInstall: proptools.Bool(m.commonProperties.No_full_install),
+ InVendorRamdisk: m.InVendorRamdisk(),
+ ExemptFromRequiredApplicableLicensesProperty: exemptFromRequiredApplicableLicensesProperty(m.module),
+ RequiredModuleNames: m.module.RequiredModuleNames(ctx),
+ HostRequiredModuleNames: m.module.HostRequiredModuleNames(),
+ TargetRequiredModuleNames: m.module.TargetRequiredModuleNames(),
+ VintfFragmentModuleNames: m.module.VintfFragmentModuleNames(ctx),
+ Dists: m.Dists(),
}
if mm, ok := m.module.(interface {
MinSdkVersion(ctx EarlyModuleContext) ApiLevel