Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebebb5f8 authored by juyuchen's avatar juyuchen
Browse files

audio policy: fix using hearing aid when force use NO_BT_A2DP

Bug: 122615787
Test: manual audio test
Change-Id: If694d08e56eac0791806b283f6ec07894dcbcccf
parent b075c7c6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -429,7 +429,9 @@ audio_devices_t Engine::getDeviceForStrategyInt(legacy_strategy strategy,
                    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) &&