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

Commit f42d99d0 authored by Juyu Chen's avatar Juyu Chen Committed by Android (Google) Code Review
Browse files

Merge "audio policy: fix using hearing aid when force use NO_BT_A2DP"

parents f9097e30 ebebb5f8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -431,7 +431,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) &&