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

Commit 570864b1 authored by Robert Gross's avatar Robert Gross Committed by Chris Manton
Browse files

Ignore a2dp connection request in StateClosing

Receiving BTIF_AV_CONNECT_REQ_EVT in BtifAvStateMachine:StateClosing
will cause the state machine to get stuck. Add a transition to
StateIdle to release this, connection request will fail though.

Bug: 211415049
Test: atest BluetoothInstrumentationTests
Change-Id: Ic34ac5013a20dcb5ff29f91ec1b19bbaff08dba8
parent 1234e8d7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2320,6 +2320,15 @@ bool BtifAvStateMachine::StateClosing::ProcessEvent(uint32_t event,
      btif_a2dp_on_offload_started(peer_.PeerAddress(), BTA_AV_FAIL);
      break;

    case BTIF_AV_CONNECT_REQ_EVT:
      BTIF_TRACE_WARNING("%s: Peer %s : Ignore %s in StateClosing",
                         __PRETTY_FUNCTION__,
                         peer_.PeerAddress().ToString().c_str(),
                         BtifAvEvent::EventName(event).c_str());
      btif_queue_advance();
      peer_.StateMachine().TransitionTo(BtifAvStateMachine::kStateIdle);
      break;

    default:
      BTIF_TRACE_WARNING("%s: Peer %s : Unhandled event=%s",
                         __PRETTY_FUNCTION__,