Merge changes from topic "policy_volume_emulator"
* changes:
Revert "Revert "audiopolicy: engine: use apm XML config file for volume curves""
Revert "Revert "audiopolicy: moves Stream Volume Curves to Engine""
diff --git a/services/audiopolicy/enginedefault/src/Engine.cpp b/services/audiopolicy/enginedefault/src/Engine.cpp
index fd6a013..f191738 100644
--- a/services/audiopolicy/enginedefault/src/Engine.cpp
+++ b/services/audiopolicy/enginedefault/src/Engine.cpp
@@ -402,7 +402,9 @@
outputDeviceTypesToIgnore);
break;
}
- if (device2 == AUDIO_DEVICE_NONE) {
+ // FIXME: Find a better solution to prevent routing to BT hearing aid(b/122931261).
+ if ((device2 == AUDIO_DEVICE_NONE) &&
+ (getForceUse(AUDIO_POLICY_FORCE_FOR_MEDIA) != AUDIO_POLICY_FORCE_NO_BT_A2DP)) {
device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_HEARING_AID;
}
if ((device2 == AUDIO_DEVICE_NONE) &&