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

Commit 133ebefb authored by Colin Cross's avatar Colin Cross
Browse files

Override EarlyModuleContext.Namespace

Make android.EarlyModuleContext return a *Namespace.

Test: m checkbuild
Change-Id: I4c29d5e69e90eb9b7afbefc1355f63991a3e3331
parent 29737cfc
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ type EarlyModuleContext interface {
	GlobFiles(globPattern string, excludes []string) Paths
	IsSymlink(path Path) bool
	Readlink(path Path) string

	Namespace() *Namespace
}

// BaseModuleContext is the same as blueprint.BaseModuleContext except that Config() returns
@@ -219,7 +221,6 @@ type ModuleContext interface {
	VisitAllModuleVariants(visit func(Module))

	GetMissingDependencies() []string
	Namespace() blueprint.Namespace
}

type Module interface {
@@ -1187,7 +1188,7 @@ func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) {

	var deps Paths

	namespacePrefix := ctx.Namespace().(*Namespace).id
	namespacePrefix := ctx.Namespace().id
	if namespacePrefix != "" {
		namespacePrefix = namespacePrefix + "-"
	}
@@ -1498,6 +1499,10 @@ func (e *earlyModuleContext) SystemExtSpecific() bool {
	return e.kind == systemExtSpecificModule
}

func (e *earlyModuleContext) Namespace() *Namespace {
	return e.EarlyModuleContext.Namespace().(*Namespace)
}

type baseModuleContext struct {
	bp blueprint.BaseModuleContext
	earlyModuleContext