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

Commit b3d95008 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7482982 from 608515b6 to sc-release

Change-Id: Ie611acaf0903da6e6719a27802720bd834ba751d
parents 26f83312 608515b6
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "bta/ag/bta_ag_int.h"
#include "bta/include/bta_ag_api.h"
#include "bta/include/utl.h"
#include "device/include/interop.h"
#include "osi/include/compat.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"  // UNUSED_ATTR
@@ -820,6 +821,21 @@ static bool bta_ag_parse_biev_response(tBTA_AG_SCB* p_scb, tBTA_AG_VAL* val) {
  return true;
}

/*******************************************************************************
 *
 * Function         bta_ag_bind_timer_cback
 *
 * Description      Handles bind timer callback
 *
 *
 * Returns          void
 *
 ******************************************************************************/
static void bta_ag_bind_timer_cback(void* data) {
  tBTA_AG_SCB* p_scb = (tBTA_AG_SCB*)data;
  bta_ag_svc_conn_open(p_scb, tBTA_AG_DATA::kEmpty);
}

/*******************************************************************************
 *
 * Function         bta_ag_at_hfp_cback
@@ -966,6 +982,13 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type,
            !((p_scb->masked_features & BTA_AG_FEAT_HF_IND) &&
              (p_scb->peer_features & BTA_AG_PEER_FEAT_HF_IND))) {
          bta_ag_svc_conn_open(p_scb, tBTA_AG_DATA::kEmpty);
        } else {
          if (p_scb->peer_version >= HFP_VERSION_1_7 &&
              interop_match_addr(INTEROP_SLC_SKIP_BIND_COMMAND,
                                 &p_scb->peer_addr)) {
            alarm_set_on_mloop(p_scb->bind_timer, BTA_AG_BIND_TIMEOUT_MS,
                               bta_ag_bind_timer_cback, p_scb);
          }
        }
      } else {
        val.idx = bta_ag_parse_chld(p_scb, val.str);
@@ -1008,6 +1031,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type,
    case BTA_AG_AT_BIND_EVT:
      APPL_TRACE_DEBUG("%s BTA_AG_AT_BIND_EVT arg_type: %d", __func__,
                       arg_type);
      alarm_cancel(p_scb->bind_timer);
      if (arg_type == BTA_AG_AT_SET) {
        if (bta_ag_parse_bind_set(p_scb, val)) {
          bta_ag_send_ok(p_scb);
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@
  (BTA_AG_FEAT_3WAY | BTA_AG_FEAT_ECNR | BTA_AG_FEAT_VREC | \
   BTA_AG_FEAT_INBAND | BTA_AG_FEAT_VTAG)

/* Timeout for alarm in 2018 toyota camry carkit workaround */
#define BTA_AG_BIND_TIMEOUT_MS 500

enum {
  /* these events are handled by the state machine */
  BTA_AG_API_REGISTER_EVT = BTA_SYS_EVT_START(BTA_ID_AG),
@@ -231,6 +234,7 @@ struct tBTA_AG_SCB {
  uint8_t battchg_ind;      /* CIEV battery charge indicator value */
  uint8_t callheld_ind;     /* CIEV call held indicator value */
  uint32_t bia_masked_out;  /* indicators HF does not want us to send */
  alarm_t* bind_timer;      /* Timer for toyota camry 2018 carkit workaround */
  alarm_t* collision_timer;
  alarm_t* ring_timer;
  alarm_t* codec_negotiation_timer;
+138 −153

File changed.

Preview size limit exceeded, changes collapsed.

+5 −1
Original line number Diff line number Diff line
@@ -111,7 +111,11 @@ typedef enum {

  // Do not send AVDTP SUSPEND while the playback is paused.
  // Some older A2DP Sink devices might not support to pause the streaming.
  INTEROP_DISABLE_AVDTP_SUSPEND
  INTEROP_DISABLE_AVDTP_SUSPEND,

  // Some car kits do not send the AT+BIND command while establishing the SLC
  // which causes an HFP profile connection failure
  INTEROP_SLC_SKIP_BIND_COMMAND
} interop_feature_t;

// Check if a given |addr| matches a known interoperability workaround as
+3 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading