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

Commit 6d6f9f92 authored by Chris Manton's avatar Chris Manton
Browse files

[6/25] bta::hf_client Use stack::l2cap::get_interface()

Bug: 343808590
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I237f2de36dbc95ba987d95fc8126aeee3fd18ae5
parent 1ccbb4f8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@

#include "bta/hf_client/bta_hf_client_int.h"
#include "bta/include/bta_dm_api.h"
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_interface.h"
#include "stack/include/port_api.h"
#include "stack/include/sdp_status.h"
#include "types/bt_transport.h"
@@ -62,7 +62,8 @@ void bta_hf_client_start_close(tBTA_HF_CLIENT_DATA* p_data) {

  /* Take the link out of sniff and set L2C idle time to 0 */
  bta_dm_pm_active(client_cb->peer_addr);
  if (!L2CA_SetIdleTimeoutByBdAddr(client_cb->peer_addr, 0, BT_TRANSPORT_BR_EDR)) {
  if (!stack::l2cap::get_interface().L2CA_SetIdleTimeoutByBdAddr(client_cb->peer_addr, 0,
                                                                 BT_TRANSPORT_BR_EDR)) {
    log::warn("Unable to set L2CAP idle timeout peer:{} transport:{} timeout:{}",
              client_cb->peer_addr, bt_transport_text(BT_TRANSPORT_BR_EDR), 0);
  }