Call hook in java_sdk_library after droidstubs generation

Currently, droidstubs module create java_api_contribution module, but
when a java_sdk_library module dynamically creates a droidstubs module,
java_api_contribution is not created as the hook inside droidstubs get
lost. Therefore, call hook inside sdk_library after creating the
droidstubs module.

Test: m
Change-Id: I68bf1d796f6f9a6f81011ae35e4991b6ed1421ea
This commit is contained in:
Jihoon Kang
2023-02-02 22:32:31 +00:00
parent ade518ad6e
commit d48abd566b
3 changed files with 5 additions and 4 deletions

View File

@@ -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)
}
}