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

Commit 438b6e4d authored by Joseph Pirozzo's avatar Joseph Pirozzo
Browse files

Conference Call at connection

If there is an ongoing conference call at Bluetooth HFP connect make
sure that it gets registered with telecom.

Bug: 35423819
Bug: 67034276
Test: start a conference call then connect Bluetooth.
Change-Id: I8ca42769e16b6cf2b15aa87747ff01fbf5918220
(cherry picked from commit f9badc6f621c4b48bb624aff59b89f6d3a9bda0a)
parent 70f695c4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -578,6 +578,11 @@ public class HeadsetClientStateMachine extends StateMachine {
        BluetoothHeadsetClientCall c = getCall(BluetoothHeadsetClientCall.CALL_STATE_DIALING,
                BluetoothHeadsetClientCall.CALL_STATE_ALERTING,
                BluetoothHeadsetClientCall.CALL_STATE_ACTIVE);
        if (c == null) {
            // If the call being terminated is currently held, switch the action to CHLD_0
            c = getCall(BluetoothHeadsetClientCall.CALL_STATE_HELD);
            action = HeadsetClientHalConstants.CALL_ACTION_CHLD_0;
        }
        if (c != null) {
            if (NativeInterface.handleCallActionNative(getByteAddress(mCurrentDevice), action, 0)) {
                addQueuedAction(TERMINATE_CALL, action);
+4 −5
Original line number Diff line number Diff line
@@ -88,10 +88,9 @@ public class HfpClientDeviceBlock {
    }

    synchronized Connection onCreateIncomingConnection(BluetoothHeadsetClientCall call) {
        HfpClientConnection connection = connection = mConnections.get(call.getUUID());
        HfpClientConnection connection = mConnections.get(call.getUUID());
        if (connection != null) {
            connection.onAdded();
            updateConferenceableConnections();
            return connection;
        } else {
            Log.e(mTAG, "Call " + call + " ignored: connection does not exist");
@@ -109,11 +108,10 @@ public class HfpClientDeviceBlock {

    synchronized Connection onCreateUnknownConnection(BluetoothHeadsetClientCall call) {
        Uri number = Uri.fromParts(PhoneAccount.SCHEME_TEL, call.getNumber(), null);
        HfpClientConnection connection = connection = mConnections.get(call.getUUID());
        HfpClientConnection connection = mConnections.get(call.getUUID());

        if (connection != null) {
            connection.onAdded();
            updateConferenceableConnections();
            return connection;
        } else {
            Log.e(mTAG, "Call " + call + " ignored: connection does not exist");
@@ -176,7 +174,8 @@ public class HfpClientDeviceBlock {
            Bundle b = new Bundle();
            if (call.getState() == BluetoothHeadsetClientCall.CALL_STATE_DIALING
                    || call.getState() == BluetoothHeadsetClientCall.CALL_STATE_ALERTING
                    || call.getState() == BluetoothHeadsetClientCall.CALL_STATE_ACTIVE) {
                    || call.getState() == BluetoothHeadsetClientCall.CALL_STATE_ACTIVE
                    || call.getState() == BluetoothHeadsetClientCall.CALL_STATE_HELD) {
                // This is an outgoing call. Even if it is an active call we do not have a way of
                // putting that parcelable in a seaprate field.
                b.putParcelable(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, call);