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

Commit 1f3a4f94 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:...

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

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3390961



Change-Id: I3c0f16729e9543b773f7da1128c99d0577c7bc6c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 53ce735b 1ec9af42
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