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

Commit 01423bd5 authored by Joseph Pirozzo's avatar Joseph Pirozzo
Browse files

AVRCP Controller manage focus while disconnected

If Audio focus is lost(or gained)  while A2DP is not connected there is the
possibility for states to get out of sync.  Removing the check for
connectivity ensures that the state can be properly managed.

Bug: 144082798
Test: Disconnect BT device, lose audio focus, verify
btif_a2dp_sink_set_focus_state_event state gets updated.

Change-Id: If5802418f6069dbc72824745307342776175d9d8
(cherry picked from commit aed52189)

Change-Id: I22a7ee2a3e51c3dea441a6f185e1c993cd65c4a1
Merged-In: If5802418f6069dbc72824745307342776175d9d8
parent b67293a6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -667,7 +667,6 @@ static void btif_a2dp_sink_set_focus_state_event(
  LOG_INFO(LOG_TAG, "%s: state=%d", __func__, state);
  LockGuard lock(g_mutex);

  if (!btif_av_is_connected()) return;
  APPL_TRACE_DEBUG("%s: setting focus state to %d", __func__, state);
  btif_a2dp_sink_cb.rx_focus_state = state;
  if (btif_a2dp_sink_cb.rx_focus_state == BTIF_A2DP_SINK_FOCUS_NOT_GRANTED) {