Consolidate baseContext, BaseContext, and BaseModuleContext
blueprint.BaseModuleContext is the set of methods available to all
module-specific calls (GenerateBuildActions or mutators). The
android package split the same functionality across baseContext (nee
androidBaseContext), BaseModuleContext, and BaseContext.
Consolidate all of them into android.BaseModuleContext.
Test: m checkbuild
Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
diff --git a/android/mutator.go b/android/mutator.go
index 5a92f70..cd0d152 100644
--- a/android/mutator.go
+++ b/android/mutator.go
@@ -114,7 +114,6 @@
type TopDownMutatorContext interface {
BaseModuleContext
- baseContext
OtherModuleExists(name string) bool
Rename(name string)
@@ -143,7 +142,7 @@
type topDownMutatorContext struct {
blueprint.TopDownMutatorContext
- baseContextImpl
+ baseModuleContext
walkPath []Module
}
@@ -151,7 +150,6 @@
type BottomUpMutatorContext interface {
BaseModuleContext
- baseContext
OtherModuleExists(name string) bool
Rename(name string)
@@ -170,7 +168,7 @@
type bottomUpMutatorContext struct {
blueprint.BottomUpMutatorContext
- baseContextImpl
+ baseModuleContext
}
func (x *registerMutatorsContext) BottomUp(name string, m BottomUpMutator) MutatorHandle {
@@ -178,7 +176,7 @@
if a, ok := ctx.Module().(Module); ok {
actx := &bottomUpMutatorContext{
BottomUpMutatorContext: ctx,
- baseContextImpl: a.base().baseContextFactory(ctx),
+ baseModuleContext: a.base().baseModuleContextFactory(ctx),
}
m(actx)
}
@@ -193,7 +191,7 @@
if a, ok := ctx.Module().(Module); ok {
actx := &topDownMutatorContext{
TopDownMutatorContext: ctx,
- baseContextImpl: a.base().baseContextFactory(ctx),
+ baseModuleContext: a.base().baseModuleContextFactory(ctx),
}
m(actx)
}