Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ec9af42 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AddLoadHookWithPriority function in build/soong/android" into main am: 158472c7

parents 198be083 158472c7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -59,6 +59,16 @@ func AddLoadHook(m blueprint.Module, hook func(LoadHookContext)) {
	})
}

func AddLoadHookWithPriority(m blueprint.Module, hook func(LoadHookContext), priority int) {
	blueprint.AddLoadHookWithPriority(m, func(ctx blueprint.LoadHookContext) {
		actx := &loadHookContext{
			earlyModuleContext: m.(Module).base().earlyModuleContextFactory(ctx),
			bp:                 ctx,
		}
		hook(actx)
	}, priority)
}

type loadHookContext struct {
	earlyModuleContext
	bp     blueprint.LoadHookContext