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

Commit f670ac24 authored by Mallikarjuna GB's avatar Mallikarjuna GB Committed by Android Git Automerger
Browse files

am e80c5aea: Handle SLC in MultiHFPending state

* commit 'e80c5aea':
  Handle SLC in MultiHFPending state
parents 5f4e4d0b e80c5aea
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -1920,6 +1920,9 @@ final class HeadsetStateMachine extends StateMachine {
                    }
                }
                break;
            case HeadsetHalConstants.CONNECTION_STATE_SLC_CONNECTED:
                processSlcConnected();
                break;
            case HeadsetHalConstants.CONNECTION_STATE_CONNECTING:
                if (mConnectedDevicesList.contains(device)) {
                    Log.e(TAG, "current device tries to connect back");
@@ -1998,6 +2001,19 @@ final class HeadsetStateMachine extends StateMachine {
            }
        }

        private void processSlcConnected() {
            if (mPhoneProxy != null) {
                try {
                    mPhoneProxy.queryPhoneState();
                } catch (RemoteException e) {
                    Log.e(TAG, Log.getStackTraceString(new Throwable()));
                }
            } else {
                Log.e(TAG, "Handsfree phone proxy null for query phone state");
            }
        }


        private void processMultiHFConnected(BluetoothDevice device) {
            log("MultiHFPending state: processMultiHFConnected");
            if (mActiveScoDevice != null && mActiveScoDevice.equals(device)) {