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

Commit 1e9890eb authored by William Escande's avatar William Escande
Browse files

Disable in-band ring if more than one device is connected

Disable in-band ringtone only if more than one
device is connected. Don't disable if second device
is still in connecting state.

Change-Id: I0fa53a7865420466ad70733877ef2c2db534d188
Bug: 203061441
Test: Manual testing
parent d8c54215
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1896,8 +1896,7 @@ public class HeadsetService extends ProfileService {
    public void onConnectionStateChangedFromStateMachine(BluetoothDevice device, int fromState,
            int toState) {
        synchronized (mStateMachines) {
            List<BluetoothDevice> audioConnectableDevices =
                    getDevicesMatchingConnectionStates(CONNECTING_CONNECTED_STATES);
            List<BluetoothDevice> audioConnectableDevices = getConnectedDevices();
            if (fromState != BluetoothProfile.STATE_CONNECTED
                    && toState == BluetoothProfile.STATE_CONNECTED) {
                if (audioConnectableDevices.size() > 1) {