Loading android/hooks.go +0 −34 Original line number Diff line number Diff line Loading @@ -33,24 +33,11 @@ type LoadHookContext interface { CreateModule(ModuleFactory, ...interface{}) Module } // Arch hooks are run after the module has been split into architecture variants, and can be used // to add architecture-specific properties. type ArchHookContext interface { BaseModuleContext AppendProperties(...interface{}) PrependProperties(...interface{}) } func AddLoadHook(m blueprint.Module, hook func(LoadHookContext)) { h := &m.(Module).base().hooks h.load = append(h.load, hook) } func AddArchHook(m blueprint.Module, hook func(ArchHookContext)) { h := &m.(Module).base().hooks h.arch = append(h.arch, hook) } func (x *hooks) runLoadHooks(ctx LoadHookContext, m *ModuleBase) { if len(x.load) > 0 { for _, x := range x.load { Loading @@ -62,17 +49,6 @@ func (x *hooks) runLoadHooks(ctx LoadHookContext, m *ModuleBase) { } } func (x *hooks) runArchHooks(ctx ArchHookContext, m *ModuleBase) { if len(x.arch) > 0 { for _, x := range x.arch { x(ctx) if ctx.Failed() { return } } } } type InstallHookContext interface { ModuleContext Path() InstallPath Loading Loading @@ -119,7 +95,6 @@ func (x *hooks) runInstallHooks(ctx ModuleContext, path InstallPath, symlink boo type hooks struct { load []func(LoadHookContext) arch []func(ArchHookContext) install []func(InstallHookContext) } Loading @@ -137,12 +112,3 @@ func LoadHookMutator(ctx TopDownMutatorContext) { m.base().hooks.runLoadHooks(loadHookCtx, m.base()) } } func archHookMutator(ctx TopDownMutatorContext) { if m, ok := ctx.Module().(Module); ok { // Cast through *topDownMutatorContext because AppendProperties is implemented // on *topDownMutatorContext but not exposed through TopDownMutatorContext var archHookCtx ArchHookContext = ctx.(*topDownMutatorContext) m.base().hooks.runArchHooks(archHookCtx, m.base()) } } android/mutator.go +0 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ func registerArchMutator(ctx RegisterMutatorsContext) { ctx.BottomUp("os", osMutator).Parallel() ctx.BottomUp("image", imageMutator).Parallel() ctx.BottomUp("arch", archMutator).Parallel() ctx.TopDown("arch_hooks", archHookMutator).Parallel() } var preDeps = []RegisterMutatorFunc{ Loading Loading
android/hooks.go +0 −34 Original line number Diff line number Diff line Loading @@ -33,24 +33,11 @@ type LoadHookContext interface { CreateModule(ModuleFactory, ...interface{}) Module } // Arch hooks are run after the module has been split into architecture variants, and can be used // to add architecture-specific properties. type ArchHookContext interface { BaseModuleContext AppendProperties(...interface{}) PrependProperties(...interface{}) } func AddLoadHook(m blueprint.Module, hook func(LoadHookContext)) { h := &m.(Module).base().hooks h.load = append(h.load, hook) } func AddArchHook(m blueprint.Module, hook func(ArchHookContext)) { h := &m.(Module).base().hooks h.arch = append(h.arch, hook) } func (x *hooks) runLoadHooks(ctx LoadHookContext, m *ModuleBase) { if len(x.load) > 0 { for _, x := range x.load { Loading @@ -62,17 +49,6 @@ func (x *hooks) runLoadHooks(ctx LoadHookContext, m *ModuleBase) { } } func (x *hooks) runArchHooks(ctx ArchHookContext, m *ModuleBase) { if len(x.arch) > 0 { for _, x := range x.arch { x(ctx) if ctx.Failed() { return } } } } type InstallHookContext interface { ModuleContext Path() InstallPath Loading Loading @@ -119,7 +95,6 @@ func (x *hooks) runInstallHooks(ctx ModuleContext, path InstallPath, symlink boo type hooks struct { load []func(LoadHookContext) arch []func(ArchHookContext) install []func(InstallHookContext) } Loading @@ -137,12 +112,3 @@ func LoadHookMutator(ctx TopDownMutatorContext) { m.base().hooks.runLoadHooks(loadHookCtx, m.base()) } } func archHookMutator(ctx TopDownMutatorContext) { if m, ok := ctx.Module().(Module); ok { // Cast through *topDownMutatorContext because AppendProperties is implemented // on *topDownMutatorContext but not exposed through TopDownMutatorContext var archHookCtx ArchHookContext = ctx.(*topDownMutatorContext) m.base().hooks.runArchHooks(archHookCtx, m.base()) } }
android/mutator.go +0 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ func registerArchMutator(ctx RegisterMutatorsContext) { ctx.BottomUp("os", osMutator).Parallel() ctx.BottomUp("image", imageMutator).Parallel() ctx.BottomUp("arch", archMutator).Parallel() ctx.TopDown("arch_hooks", archHookMutator).Parallel() } var preDeps = []RegisterMutatorFunc{ Loading