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

Commit 90c8f05d authored by Sumit Bajpai's avatar Sumit Bajpai Committed by Gerrit - the friendly Code Review server
Browse files

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

When incoming call is answered, do not connect bluetooth audio from
CallAudioManager. This causes issues with some remotes which find
SCO connected even before call active indicators are sent to it.

CRs-Fixed: 770247
Change-Id: I7eb0818987b1707be741d452be86c15dba7c62a3
parent ce0d89da
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) {