From 87901b055bd4d7707b2dfaa8934e30b164b3cc9e Mon Sep 17 00:00:00 2001 From: atrost Date: Thu, 29 Aug 2019 12:48:43 +0100 Subject: [PATCH] Move platform compat config to their own directory. This prevents SystemConfig from trying to read them. Also removed ' ' prefix+postfix when creating an empty config. Bug: 140074769 Bug: 140092095 Test: Flashed device, no more "SystemConfig: Tag compat-change is unknown..." warnings in logcat Change-Id: I374826526fe3e4555474688b65a0be7253c6dd8c --- java/platform_compat_config.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go index f1da20394..3d46077b5 100644 --- a/java/platform_compat_config.go +++ b/java/platform_compat_config.go @@ -23,8 +23,7 @@ func init() { } type platformCompatConfigProperties struct { - Src *string `android:"path"` - Prefix *string + Src *string `android:"path"` } type platformCompatConfig struct { @@ -38,13 +37,13 @@ type platformCompatConfig struct { func (p *platformCompatConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) { rule := android.NewRuleBuilder() - configFileName := String(p.properties.Prefix) + "_platform_compat_config.xml" + configFileName := p.Name() + ".xml" p.configFile = android.PathForModuleOut(ctx, configFileName).OutputPath path := android.PathForModuleSrc(ctx, String(p.properties.Src)) // Use the empty config if the compat config file idoesn't exist (can happen if @ChangeId // annotation is not used). - emptyConfig := `` + emptyConfig := `''` configPath := `compat/compat_config.xml` rule.Command(). @@ -61,13 +60,13 @@ func (p *platformCompatConfig) GenerateAndroidBuildActions(ctx android.ModuleCon Text(configPath). Text(`>`). Output(p.configFile). - Text(`; else echo '`). + Text(`; else echo `). Text(emptyConfig). - Text(`' >`). + Text(`>`). Output(p.configFile). Text(`; fi`) - p.installDirPath = android.PathForModuleInstall(ctx, "etc", "sysconfig") + p.installDirPath = android.PathForModuleInstall(ctx, "etc", "compatconfig") rule.Build(pctx, ctx, configFileName, "Extract compat/compat_config.xml and install it") }