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

Commit 37373687 authored by Jigong Yin's avatar Jigong Yin Committed by android-build-merger
Browse files

Add IOT device list for RNR, avoid the bond fail.

am: 40d0a835

Change-Id: I525b91cf631c9933610ff4c77fe88de2a496647a
parents fa2d6512 40d0a835
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
#include "stack/gatt/connection_manager.h"
#include "stack/include/gatt_api.h"
#include "utl.h"
#include "device/include/interop.h"

#if (GAP_INCLUDED == TRUE)
#include "gap_api.h"
@@ -1945,10 +1946,12 @@ static void bta_dm_discover_device(const RawAddress& remote_bd_addr) {
    APPL_TRACE_DEBUG("%s appl_knows_rem_name %d", __func__,
                     bta_dm_search_cb.p_btm_inq_info->appl_knows_rem_name);
  }
  if ((bta_dm_search_cb.p_btm_inq_info) &&
  if (((bta_dm_search_cb.p_btm_inq_info) &&
       (bta_dm_search_cb.p_btm_inq_info->results.device_type ==
        BT_DEVICE_TYPE_BLE) &&
      (bta_dm_search_cb.state == BTA_DM_SEARCH_ACTIVE)) {
       (bta_dm_search_cb.state == BTA_DM_SEARCH_ACTIVE)) ||
      (transport == BT_TRANSPORT_LE &&
       interop_match_addr(INTEROP_DISABLE_NAME_REQUEST, &bta_dm_search_cb.peer_bdaddr))) {
    /* Do not perform RNR for LE devices at inquiry complete*/
    bta_dm_search_cb.name_discover_done = true;
  }
+6 −0
Original line number Diff line number Diff line
@@ -94,6 +94,12 @@ typedef enum {
  // Set a very low initial sniff subrating for HID devices that do not
  // set their own sniff interval.
  INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL,

  // Disable remote name requst for some devices.
  // The public address of these devices are same as the Random address in ADV.
  // Then will get name by LE_Create_connection, actually fails,
  // but will block pairing.
  INTEROP_DISABLE_NAME_REQUEST
} interop_feature_t;

// Check if a given |addr| matches a known interoperability workaround as
+4 −0
Original line number Diff line number Diff line
@@ -146,6 +146,10 @@ static const interop_addr_entry_t interop_addr_database[] = {

    // AirPods 2 - unacceptably loud volume
    {{{0x9c, 0x64, 0x8b, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},

    // for skip name request,
    // because BR/EDR address and ADV random address are the same
    {{{0xd4, 0x7a, 0xe2, 0, 0, 0}}, 3, INTEROP_DISABLE_NAME_REQUEST},
};

typedef struct {
+1 −0
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) {
    CASE_RETURN_STR(INTEROP_DYNAMIC_ROLE_SWITCH)
    CASE_RETURN_STR(INTEROP_DISABLE_ROLE_SWITCH)
    CASE_RETURN_STR(INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL)
    CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST)
  }

  return "UNKNOWN";