Make CreateModule take an android.ModuleFactory
Reduce the boilerplate required to call CreateModule by taking an android.ModuleFactory instead of a blueprint.ModuleFactory. Test: m checkbuild Change-Id: I1259d2dd3f7893b5319c333bc180727ac40f9e91
This commit is contained in:
@@ -121,7 +121,7 @@ type TopDownMutatorContext interface {
|
||||
|
||||
Rename(name string)
|
||||
|
||||
CreateModule(blueprint.ModuleFactory, ...interface{})
|
||||
CreateModule(ModuleFactory, ...interface{})
|
||||
}
|
||||
|
||||
type topDownMutatorContext struct {
|
||||
@@ -243,9 +243,9 @@ func (t *topDownMutatorContext) Rename(name string) {
|
||||
t.Module().base().commonProperties.DebugName = name
|
||||
}
|
||||
|
||||
func (t *topDownMutatorContext) CreateModule(factory blueprint.ModuleFactory, props ...interface{}) {
|
||||
func (t *topDownMutatorContext) CreateModule(factory ModuleFactory, props ...interface{}) {
|
||||
inherited := []interface{}{&t.Module().base().commonProperties, &t.Module().base().variableProperties}
|
||||
t.bp.CreateModule(factory, append(inherited, props...)...)
|
||||
t.bp.CreateModule(ModuleFactoryAdaptor(factory), append(inherited, props...)...)
|
||||
}
|
||||
|
||||
func (b *bottomUpMutatorContext) MutatorName() string {
|
||||
|
Reference in New Issue
Block a user