Allow pre-singleton types to be registered in RegistrationContext

Bug: 181070625
Test: m droid
Change-Id: I708b78ed0b42ec55b0442307f40531cfe1233c2b
This commit is contained in:
Paul Duffin
2021-02-24 01:43:18 +00:00
parent b2773e116f
commit eafc16bf14
3 changed files with 16 additions and 2 deletions

View File

@@ -140,6 +140,10 @@ func (ctx *TestContext) RegisterSingletonType(name string, factory SingletonFact
ctx.Context.RegisterSingletonType(name, SingletonFactoryAdaptor(ctx.Context, factory))
}
func (ctx *TestContext) RegisterPreSingletonType(name string, factory SingletonFactory) {
ctx.Context.RegisterPreSingletonType(name, SingletonFactoryAdaptor(ctx.Context, factory))
}
func (ctx *TestContext) ModuleForTests(name, variant string) TestingModule {
var module Module
ctx.VisitAllModules(func(m blueprint.Module) {