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

Commit 3ca51430 authored by Sanket Agarwal's avatar Sanket Agarwal Committed by android-build-merger
Browse files

HF should wait for AG to change conference

am: 1ec9ba7d

Change-Id: Ia1f3bec0f045b53617632ecc026c0d3c135e36ad
parents c22c1370 1ec9ba7d
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,6 @@ public class HfpClientConference extends Conference {
    public void onDisconnect() {
    public void onDisconnect() {
        Log.d(TAG, "onDisconnect");
        Log.d(TAG, "onDisconnect");
        mHeadsetProfile.terminateCall(mDevice, null);
        mHeadsetProfile.terminateCall(mDevice, null);
        setDisconnected(new DisconnectCause(DisconnectCause.LOCAL));
    }
    }


    @Override
    @Override
+2 −2
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ import android.os.Handler;
import android.telecom.Connection;
import android.telecom.Connection;
import android.telecom.ConnectionRequest;
import android.telecom.ConnectionRequest;
import android.telecom.ConnectionService;
import android.telecom.ConnectionService;
import android.telecom.DisconnectCause;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telecom.TelecomManager;
@@ -377,9 +378,7 @@ public class HfpClientConnectionService extends ConnectionService {
        if (mConference == null) {
        if (mConference == null) {
            BluetoothDevice device = getDevice(getHandle());
            BluetoothDevice device = getDevice(getHandle());
            mConference = new HfpClientConference(getHandle(), device, mHeadsetProfile);
            mConference = new HfpClientConference(getHandle(), device, mHeadsetProfile);
            addConference(mConference);
        }
        }
        mConference.setActive();
        if (connection1.getConference() == null) {
        if (connection1.getConference() == null) {
            mConference.addConnection(connection1);
            mConference.addConnection(connection1);
        }
        }
@@ -432,6 +431,7 @@ public class HfpClientConnectionService extends ConnectionService {
            if (DBG) {
            if (DBG) {
                Log.d(TAG, "Conference has no connection, destroying");
                Log.d(TAG, "Conference has no connection, destroying");
            }
            }
            mConference.setDisconnected(new DisconnectCause(DisconnectCause.LOCAL));
            mConference.destroy();
            mConference.destroy();
            mConference = null;
            mConference = null;
        }
        }