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

Commit 199b959d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Telecom: Don't connect bluetooth audio when incoming call is answered."

parents 572f9e94 90c8f05d
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -98,14 +98,9 @@ final class CallAudioManager extends CallsManagerListenerBase
    public void onIncomingCallAnswered(Call call) {
        int route = mAudioState.route;

        // We do two things:
        // (1) If this is the first call, then we can to turn on bluetooth if available.
        // (2) Unmute the audio for the new incoming call.
        boolean isOnlyCall = CallsManager.getInstance().getCalls().size() == 1;
        if (isOnlyCall && mBluetoothManager.isBluetoothAvailable()) {
            mBluetoothManager.connectBluetoothAudio();
            route = AudioState.ROUTE_BLUETOOTH;
        }
        // BT stack will connect audio upon receiving active call state.
        // We unmute the audio for the new incoming call.

        setSystemAudioState(false /* isMute */, route, mAudioState.supportedRouteMask);

        if (mContext == null) {