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

Commit 1ec9ba7d authored by Sanket Agarwal's avatar Sanket Agarwal
Browse files

HF should wait for AG to change conference

We should always wait for AG to make changes to the call before we show
it to the user so that the UI does not get confusing (inconsistent).
Currently we are not waiting for the conf. call to be
disconnected/established by AG before we show this on our end.

Bug: b/29898872
Change-Id: Ia9198958122e9e539fb6f2a6f08942d3174ae2fc
(cherry picked from commit de8d996c)
parent edb38dfa
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ public class HfpClientConference extends Conference {
    public void onDisconnect() {
        Log.d(TAG, "onDisconnect");
        mHeadsetProfile.terminateCall(mDevice, null);
        setDisconnected(new DisconnectCause(DisconnectCause.LOCAL));
    }

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