Merge "Cleanup java.DefaultsFactory()"

This commit is contained in:
Treehugger Robot 2019-12-07 08:52:21 +00:00 committed by Gerrit Code Review
commit 667039f404
2 changed files with 3 additions and 4 deletions

View File

@ -34,7 +34,7 @@ import (
) )
func init() { func init() {
android.RegisterModuleType("java_defaults", defaultsFactory) android.RegisterModuleType("java_defaults", DefaultsFactory)
android.RegisterModuleType("java_library", LibraryFactory) android.RegisterModuleType("java_library", LibraryFactory)
android.RegisterModuleType("java_library_static", LibraryStaticFactory) android.RegisterModuleType("java_library_static", LibraryStaticFactory)
@ -2451,10 +2451,9 @@ func defaultsFactory() android.Module {
return DefaultsFactory() return DefaultsFactory()
} }
func DefaultsFactory(props ...interface{}) android.Module { func DefaultsFactory() android.Module {
module := &Defaults{} module := &Defaults{}
module.AddProperties(props...)
module.AddProperties( module.AddProperties(
&CompilerProperties{}, &CompilerProperties{},
&CompilerDeviceProperties{}, &CompilerDeviceProperties{},

View File

@ -79,7 +79,7 @@ func testContext(bp string, fs map[string][]byte) *android.TestContext {
ctx.RegisterModuleType("java_test", TestFactory) ctx.RegisterModuleType("java_test", TestFactory)
ctx.RegisterModuleType("java_import", ImportFactory) ctx.RegisterModuleType("java_import", ImportFactory)
ctx.RegisterModuleType("java_import_host", ImportFactoryHost) ctx.RegisterModuleType("java_import_host", ImportFactoryHost)
ctx.RegisterModuleType("java_defaults", defaultsFactory) ctx.RegisterModuleType("java_defaults", DefaultsFactory)
ctx.RegisterModuleType("java_system_modules", SystemModulesFactory) ctx.RegisterModuleType("java_system_modules", SystemModulesFactory)
ctx.RegisterModuleType("java_genrule", genRuleFactory) ctx.RegisterModuleType("java_genrule", genRuleFactory)
ctx.RegisterModuleType("java_plugin", PluginFactory) ctx.RegisterModuleType("java_plugin", PluginFactory)