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

Commit 667200e2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Call hook in java_sdk_library after droidstubs generation"

parents db23e228 d48abd56
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ func (d *DefaultableModuleBase) SetDefaultableHook(hook DefaultableHook) {
	d.hook = hook
}

func (d *DefaultableModuleBase) callHookIfAvailable(ctx DefaultableHookContext) {
func (d *DefaultableModuleBase) CallHookIfAvailable(ctx DefaultableHookContext) {
	if d.hook != nil {
		d.hook(ctx)
	}
@@ -82,7 +82,7 @@ type Defaultable interface {
	SetDefaultableHook(hook DefaultableHook)

	// Call the hook if specified.
	callHookIfAvailable(context DefaultableHookContext)
	CallHookIfAvailable(context DefaultableHookContext)
}

type DefaultableModule interface {
@@ -630,6 +630,6 @@ func defaultsMutator(ctx TopDownMutatorContext) {
			defaultable.applyDefaults(ctx, defaultsList)
		}

		defaultable.callHookIfAvailable(ctx)
		defaultable.CallHookIfAvailable(ctx)
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -1749,7 +1749,7 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC
		}
	}

	mctx.CreateModule(DroidstubsFactory, &props)
	mctx.CreateModule(DroidstubsFactory, &props).(*Droidstubs).CallHookIfAvailable(mctx)
}

func (module *SdkLibrary) compareAgainstLatestApi(apiScope *apiScope) bool {
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ func TestJavaSdkLibrary(t *testing.T) {
	result.ModuleForTests(apiScopePublic.stubsSourceModuleName("foo"), "android_common")
	result.ModuleForTests(apiScopeSystem.stubsSourceModuleName("foo"), "android_common")
	result.ModuleForTests(apiScopeTest.stubsSourceModuleName("foo"), "android_common")
	result.ModuleForTests(apiScopePublic.stubsSourceModuleName("foo")+".api.contribution", "")
	result.ModuleForTests("foo"+sdkXmlFileSuffix, "android_common")
	result.ModuleForTests("foo.api.public.28", "")
	result.ModuleForTests("foo.api.system.28", "")