From c34d2329b47b93c89905959c21e46eb6f0a92c91 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 3 Jan 2020 15:23:27 -0800 Subject: [PATCH] Use blueprint.EarlyModuleContext Make android.EarlyModuleContext wrap blueprint.EarlyModuleContext Test: m checkbuild Change-Id: I5e05c4f3dfb177811bc244a5cc2d71f42e47613b --- android/module.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/android/module.go b/android/module.go index 5c8b7125c..b98f1e4d3 100644 --- a/android/module.go +++ b/android/module.go @@ -953,7 +953,7 @@ func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) { } } -func determineModuleKind(m *ModuleBase, ctx blueprint.BaseModuleContext) moduleKind { +func determineModuleKind(m *ModuleBase, ctx blueprint.EarlyModuleContext) moduleKind { var socSpecific = Bool(m.commonProperties.Vendor) || Bool(m.commonProperties.Proprietary) || Bool(m.commonProperties.Soc_specific) var deviceSpecific = Bool(m.commonProperties.Device_specific) var productSpecific = Bool(m.commonProperties.Product_specific) @@ -1012,11 +1012,11 @@ func determineModuleKind(m *ModuleBase, ctx blueprint.BaseModuleContext) moduleK } } -func (m *ModuleBase) earlyModuleContextFactory(ctx blueprint.BaseModuleContext) earlyModuleContext { +func (m *ModuleBase) earlyModuleContextFactory(ctx blueprint.EarlyModuleContext) earlyModuleContext { return earlyModuleContext{ - BaseModuleContext: ctx, - kind: determineModuleKind(m, ctx), - config: ctx.Config().(Config), + EarlyModuleContext: ctx, + kind: determineModuleKind(m, ctx), + config: ctx.Config().(Config), } } @@ -1134,7 +1134,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) } type earlyModuleContext struct { - blueprint.BaseModuleContext + blueprint.EarlyModuleContext kind moduleKind config Config @@ -1157,12 +1157,12 @@ func (e *earlyModuleContext) GlobFiles(globPattern string, excludes []string) Pa } func (e *earlyModuleContext) Module() Module { - module, _ := e.BaseModuleContext.Module().(Module) + module, _ := e.EarlyModuleContext.Module().(Module) return module } func (e *earlyModuleContext) Config() Config { - return e.BaseModuleContext.Config().(Config) + return e.EarlyModuleContext.Config().(Config) } func (e *earlyModuleContext) AConfig() Config {