Removal of unused methods AppendProperties and PrependProperties from topDownMutatorContext

Test: m nothing
Bug: n/a

Change-Id: Ia37d1c9b96c39603964ba8db2ea6ba52d1138472
This commit is contained in:
Usta
2021-12-01 15:16:32 -05:00
parent cd4335ae45
commit 355a587e38
2 changed files with 2 additions and 22 deletions

View File

@@ -1300,6 +1300,8 @@ func (m *ModuleBase) ComponentDepsMutator(BottomUpMutatorContext) {}
func (m *ModuleBase) DepsMutator(BottomUpMutatorContext) {}
// AddProperties "registers" the provided props
// each value in props MUST be a pointer to a struct
func (m *ModuleBase) AddProperties(props ...interface{}) {
m.registerProps = append(m.registerProps, props...)
}

View File

@@ -529,28 +529,6 @@ func (t *topDownMutatorContext) CreateBazelTargetModule(
mod.base().addBp2buildInfo(info)
}
func (t *topDownMutatorContext) appendPrependHelper(props []interface{},
extendFn func([]interface{}, interface{}, proptools.ExtendPropertyFilterFunc) error) {
for _, p := range props {
err := extendFn(t.Module().base().customizableProperties, p, nil)
if err != nil {
if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok {
t.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error())
} else {
panic(err)
}
}
}
}
func (t *topDownMutatorContext) AppendProperties(props ...interface{}) {
t.appendPrependHelper(props, proptools.AppendMatchingProperties)
}
func (t *topDownMutatorContext) PrependProperties(props ...interface{}) {
t.appendPrependHelper(props, proptools.PrependMatchingProperties)
}
// android.topDownMutatorContext either has to embed blueprint.TopDownMutatorContext, in which case every method that
// has an overridden version in android.BaseModuleContext has to be manually forwarded to BaseModuleContext to avoid
// ambiguous method errors, or it has to store a blueprint.TopDownMutatorContext non-embedded, in which case every