[AudioPolicy][EngineConfigurable] Prevent regression on audio-base.h change
This CL prevents from regression each time audio-base.h is changed on
enumeration coupled with Parameter Framework structure.
The Structure type file is generated from the audio-base.h. If misaligned,
Settings would not be generated, it won't compile.
This CL also fixes a typo on name as names are now aligned.
Bug:
Test: build
Change-Id: I8fd15a8d2f92908dceb2baf7ca8d35f4a69f7904
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
diff --git a/services/audiopolicy/engineconfigurable/tools/Android.bp b/services/audiopolicy/engineconfigurable/tools/Android.bp
index d9e97af..3e47324 100644
--- a/services/audiopolicy/engineconfigurable/tools/Android.bp
+++ b/services/audiopolicy/engineconfigurable/tools/Android.bp
@@ -133,3 +133,29 @@
],
out: ["ProductStrategies.xml"],
}
+
+//##################################################################################################
+// Tools for policy parameter-framework common type structure file generation
+//
+python_binary_host {
+ name: "buildCommonTypesStructureFile.py",
+ main: "buildCommonTypesStructureFile.py",
+ srcs: [
+ "buildCommonTypesStructureFile.py",
+ ],
+ defaults: ["tools_default"],
+}
+
+genrule_defaults {
+ name: "buildcommontypesstructurerule",
+ tools: ["buildCommonTypesStructureFile.py"],
+ cmd: "$(location buildCommonTypesStructureFile.py) " +
+ "--androidaudiobaseheader $(location :libaudio_system_audio_base) " +
+ "--commontypesstructure $(location :common_types_structure_template) " +
+ "--outputfile $(out)",
+ srcs: [
+ ":common_types_structure_template",
+ ":libaudio_system_audio_base",
+ ],
+ out: ["PolicySubsystem-CommonTypes.xml"],
+}