summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-20 11:03:12 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-20 11:03:12 -0800
commitebc3d69b42a6bf6efb7571afb9d0991531db13cf (patch)
tree448443c08f022069c9de6d889901fc3b07db3185 /android/module.go
parentbe19d8a6fbc41d6ac154f8b146b17ae852a78227 (diff)
parent367827f1d32a0e6ab2ce749cfe0c412474e7b030 (diff)
Merge "Convert stubLibraries, soongMetricsSingleton, sdkSingleton, complianceMetadataSingleton, freezeApiSingleton and testSuiteFiles to use ModuleProxy." into main
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/android/module.go b/android/module.go
index c4a83777a..f359e9f4d 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1919,6 +1919,9 @@ type CommonModuleInfo struct {
IsStubsModule bool
Host bool
IsApexModule bool
+ // The primary licenses property, may be nil, records license metadata for the module.
+ PrimaryLicensesProperty applicableLicensesProperty
+ Owner string
}
type ApiLevelOrPlatform struct {
@@ -2254,6 +2257,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
buildComplianceMetadataProvider(ctx, m)
commonData := CommonModuleInfo{
+ Enabled: m.Enabled(ctx),
ReplacedByPrebuilt: m.commonProperties.ReplacedByPrebuilt,
Target: m.commonProperties.CompileTarget,
SkipAndroidMkProcessing: shouldSkipAndroidMkProcessing(ctx, m),
@@ -2261,6 +2265,8 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
HideFromMake: m.commonProperties.HideFromMake,
SkipInstall: m.commonProperties.SkipInstall,
Host: m.Host(),
+ PrimaryLicensesProperty: m.primaryLicensesProperty,
+ Owner: m.Owner(),
}
if mm, ok := m.module.(interface {
MinSdkVersion(ctx EarlyModuleContext) ApiLevel
@@ -2289,11 +2295,6 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
commonData.SdkVersion = mm.SdkVersion()
}
- if m.commonProperties.ForcedDisabled {
- commonData.Enabled = false
- } else {
- commonData.Enabled = m.commonProperties.Enabled.GetOrDefault(m.ConfigurableEvaluator(ctx), !m.Os().DefaultDisabled)
- }
if am, ok := m.module.(ApexModule); ok {
commonData.CanHaveApexVariants = am.CanHaveApexVariants()
commonData.NotAvailableForPlatform = am.NotAvailableForPlatform()