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
diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go
index f1da203..3d46077 100644
--- a/java/platform_compat_config.go
+++ b/java/platform_compat_config.go
@@ -23,8 +23,7 @@
 }
 
 type platformCompatConfigProperties struct {
-	Src    *string `android:"path"`
-	Prefix *string
+	Src *string `android:"path"`
 }
 
 type platformCompatConfig struct {
@@ -38,13 +37,13 @@
 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 := `<?xml version="1.0" encoding="UTF-8" standalone="no"?><config/>`
+	emptyConfig := `'<?xml version="1.0" encoding="UTF-8" standalone="no"?><config/>'`
 	configPath := `compat/compat_config.xml`
 
 	rule.Command().
@@ -61,13 +60,13 @@
 		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")
 
 }