audio: Fix handling of external devices disconnection
A mix port can be patched to multiple connected device ports. Thus, when
disconnecting an external device and removing the connected port, the
profiles of the mix port can only be cleared iff there are no more
connected device ports patched to it, and it did not have profiles prior to
connection of the first device.
Enhanced VTS tests to catch this problem in the HAL implementations. Also,
ensure that audio ports and audio routes do not change after the test
finishes. This ensures that tests can't affect each other.
Bug: 298175108
Test: atest audiosystem_tests
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia666b874958fb260513fc2b8cd20a823953ec679
diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp
index f7cf4ce..a2f0260 100644
--- a/audio/aidl/vts/Android.bp
+++ b/audio/aidl/vts/Android.bp
@@ -26,7 +26,10 @@
"libaudioaidlcommon",
"libaidlcommonsupport",
],
- header_libs: ["libaudioaidl_headers"],
+ header_libs: [
+ "libaudioaidl_headers",
+ "libexpectedutils_headers",
+ ],
cflags: [
"-Wall",
"-Wextra",