audio: Remove dependency on libxml2 from the default implementation
The default implementation switched to use the "enums"
module generated from the audio_policy_configuration.xsd schema.
This drops the dependency on libxml2 library and reduces
PSS and private dirty memory usage.
Bug: 180413957
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: If7c110cd2bd2698923957b39906a0896d18065dd
diff --git a/audio/common/7.0/Android.bp b/audio/common/7.0/Android.bp
index 1c016b4..47f031f 100644
--- a/audio/common/7.0/Android.bp
+++ b/audio/common/7.0/Android.bp
@@ -16,15 +16,14 @@
cc_library {
name: "android.hardware.audio.common@7.0-enums",
vendor_available: true,
- generated_headers: ["audio_policy_configuration_V7_0"],
- generated_sources: ["audio_policy_configuration_V7_0"],
+ generated_headers: ["audio_policy_configuration_V7_0_enums"],
+ generated_sources: ["audio_policy_configuration_V7_0_enums"],
header_libs: ["libxsdc-utils"],
- export_generated_headers: ["audio_policy_configuration_V7_0"],
+ export_generated_headers: ["audio_policy_configuration_V7_0_enums"],
export_header_lib_headers: ["libxsdc-utils"],
export_include_dirs: ["enums/include"],
shared_libs: [
"libbase",
"liblog",
- "libxml2",
],
}
diff --git a/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h b/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h
index b427f3a..7b7735e 100644
--- a/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h
+++ b/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-#ifndef ANDROID_AUDIO_POLICY_CONFIGURATION_V7_0_ENUMS_H
-#define ANDROID_AUDIO_POLICY_CONFIGURATION_V7_0_ENUMS_H
+#ifndef ANDROID_AUDIO_POLICY_CONFIGURATION_V7_0__ENUMS_H
+#define ANDROID_AUDIO_POLICY_CONFIGURATION_V7_0__ENUMS_H
#include <sys/types.h>
#include <algorithm>
#include <cctype>
-#include <android_audio_policy_configuration_V7_0.h>
+#include <android_audio_policy_configuration_V7_0_enums.h>
namespace android::audio::policy::configuration::V7_0 {
@@ -264,4 +264,4 @@
} // namespace android::audio::policy::configuration::V7_0
-#endif // ANDROID_AUDIO_POLICY_CONFIGURATION_V7_0_ENUMS_H
+#endif // ANDROID_AUDIO_POLICY_CONFIGURATION_V7_0__ENUMS_H
diff --git a/audio/common/7.0/example/Android.bp b/audio/common/7.0/example/Android.bp
index 03c1cd8..a6ae560 100644
--- a/audio/common/7.0/example/Android.bp
+++ b/audio/common/7.0/example/Android.bp
@@ -35,7 +35,6 @@
"libcutils",
"libhidlbase",
"liblog",
- "libxml2",
"libutils",
"android.hardware.audio@7.0",
"android.hardware.audio.common@7.0",
diff --git a/audio/common/7.0/example/Effect.cpp b/audio/common/7.0/example/Effect.cpp
index 5788811..0621669 100644
--- a/audio/common/7.0/example/Effect.cpp
+++ b/audio/common/7.0/example/Effect.cpp
@@ -17,7 +17,7 @@
#define LOG_TAG "EffectsFactory7.0"
#include <log/log.h>
-#include <android_audio_policy_configuration_V7_0.h>
+#include <android_audio_policy_configuration_V7_0-enums.h>
#include "Effect.h"