diff options
| author | 2020-05-11 09:39:39 +0000 | |
|---|---|---|
| committer | 2020-05-11 09:39:39 +0000 | |
| commit | b476a1eb50b5d9fdb2676db2728d20fa1faf26c0 (patch) | |
| tree | 53296e8d0ff276aa956693edc9a461921acbf4da | |
| parent | 077fd650a1806b6b2eac7bd1f4d336118e48acc6 (diff) | |
| parent | bf735aa74438d3e0b107a8d968314dbee15b292d (diff) | |
Merge "Switch java_sdk_library_import to use SetDefaultableHook()" into rvc-dev
| -rw-r--r-- | java/sdk_library.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index a1ae0e105..361ac7135 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -1085,7 +1085,7 @@ func sdkLibraryImportFactory() android.Module { android.InitSdkAwareModule(module) InitJavaModule(module, android.HostAndDeviceSupported) - android.AddLoadHook(module, func(mctx android.LoadHookContext) { module.createInternalModules(mctx) }) + module.SetDefaultableHook(func(mctx android.DefaultableHookContext) { module.createInternalModules(mctx) }) return module } @@ -1097,7 +1097,7 @@ func (module *sdkLibraryImport) Name() string { return module.prebuilt.Name(module.ModuleBase.Name()) } -func (module *sdkLibraryImport) createInternalModules(mctx android.LoadHookContext) { +func (module *sdkLibraryImport) createInternalModules(mctx android.DefaultableHookContext) { // If the build is configured to use prebuilts then force this to be preferred. if mctx.Config().UnbundledBuildUsePrebuiltSdks() { @@ -1120,7 +1120,7 @@ func (module *sdkLibraryImport) createInternalModules(mctx android.LoadHookConte *javaSdkLibraries = append(*javaSdkLibraries, module.BaseModuleName()) } -func (module *sdkLibraryImport) createJavaImportForStubs(mctx android.LoadHookContext, apiScope *apiScope, scopeProperties *sdkLibraryScopeProperties) { +func (module *sdkLibraryImport) createJavaImportForStubs(mctx android.DefaultableHookContext, apiScope *apiScope, scopeProperties *sdkLibraryScopeProperties) { // Creates a java import for the jar with ".stubs" suffix props := struct { Name *string @@ -1156,7 +1156,7 @@ func (module *sdkLibraryImport) createJavaImportForStubs(mctx android.LoadHookCo mctx.CreateModule(ImportFactory, &props) } -func (module *sdkLibraryImport) createPrebuiltStubsSources(mctx android.LoadHookContext, apiScope *apiScope, scopeProperties *sdkLibraryScopeProperties) { +func (module *sdkLibraryImport) createPrebuiltStubsSources(mctx android.DefaultableHookContext, apiScope *apiScope, scopeProperties *sdkLibraryScopeProperties) { props := struct { Name *string Srcs []string |