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

Commit 600e3dc0 authored by Jack He's avatar Jack He Committed by android-build-merger
Browse files

HFP: Indicate profile as connected after SLC is established

am: 8eb9c7ae

Change-Id: Ieadcc25cbc9e147541a873c28d6961c6d5689543
parents b73c9cd4 8eb9c7ae
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -487,12 +487,11 @@ public class HeadsetService extends ProfileService {
        // TODO(BT) BLUETOOTH or BLUETOOTH_ADMIN permission
        enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
        if (!mStateMachine.isConnected()) {
            return false;
        }
        if (!mStateMachine.isSlcConnected()) {
            Log.w(TAG, "connectAudio: profile not connected");
            return false;
        }
        if (mStateMachine.isAudioOn()) {
            Log.w(TAG, "connectAudio: audio is already ON");
            return false;
        }
        mStateMachine.sendMessage(HeadsetStateMachine.CONNECT_AUDIO);