Introduce device(s) role for strategy.
Adding interface to get/set/removeDevicesRoleForStrategy. The interfaces
allows to modify the devices' role, such as preferred, for strategy.
Get/set/removePreferredDeviceForStrategy is reimplemented by the new
interfaces.
Test: atest AudioHostTest
Test: atest AudioServiceHostTest
Test: atest AudioServiceTest
Test: atest audiopolicy_tests
Bug: 160352965
Change-Id: I0af737542a8599938cae4e142b733159f21ed5a8
Merged-In: I0af737542a8599938cae4e142b733159f21ed5a8
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 529b87c..eebaa7e 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -2994,7 +2994,7 @@
__func__, port->type, port->ext.device.type,
port->ext.device.address, port->id, patch.isSoftware());
if (port->type != AUDIO_PORT_TYPE_DEVICE || port->ext.device.type != mDevice.mType
- || port->ext.device.address != mDevice.mAddress) {
+ || port->ext.device.address != mDevice.address()) {
return NAME_NOT_FOUND;
}
status_t status = NAME_NOT_FOUND;