diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go index 2c47b0a3a..218154e96 100644 --- a/java/platform_compat_config.go +++ b/java/platform_compat_config.go @@ -20,11 +20,17 @@ import ( ) func init() { - android.RegisterSingletonType("platform_compat_config_singleton", platformCompatConfigSingletonFactory) - android.RegisterModuleType("platform_compat_config", PlatformCompatConfigFactory) - android.RegisterModuleType("global_compat_config", globalCompatConfigFactory) + registerPlatformCompatConfigBuildComponents(android.InitRegistrationContext) } +func registerPlatformCompatConfigBuildComponents(ctx android.RegistrationContext) { + ctx.RegisterSingletonType("platform_compat_config_singleton", platformCompatConfigSingletonFactory) + ctx.RegisterModuleType("platform_compat_config", PlatformCompatConfigFactory) + ctx.RegisterModuleType("global_compat_config", globalCompatConfigFactory) +} + +var PrepareForTestWithPlatformCompatConfig = android.FixtureRegisterWithContext(registerPlatformCompatConfigBuildComponents) + func platformCompatConfigPath(ctx android.PathContext) android.OutputPath { return android.PathForOutput(ctx, "compat_config", "merged_compat_config.xml") }