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

Commit 4c70e8ab authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7012656 from ae300865 to rvc-qpr2-release

Change-Id: I4a63c754b8360646b28b392ce24d1c8b5f138029
parents 29604ecd ae300865
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -102,7 +102,12 @@ typedef enum {
  INTEROP_DISABLE_NAME_REQUEST,

  // Respond AVRCP profile version only 1.4 for some device.
  INTEROP_AVRCP_1_4_ONLY
  INTEROP_AVRCP_1_4_ONLY,

  // Disable sniff mode for headsets/car-kits
  // Some car kits supports sniff mode but when DUT initiates sniff req
  // Remote will go to bad state and its leads to LMP time out.
  INTEROP_DISABLE_SNIFF
} interop_feature_t;

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

    // Honda Civic Carkit
    {{{0x0c, 0xd9, 0xc1, 0, 0, 0}}, 3, INTEROP_AVRCP_1_4_ONLY},

    // KDDI Carkit
    {{{0x44, 0xea, 0xd8, 0, 0, 0}}, 3, INTEROP_DISABLE_SNIFF}
};

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

  return "UNKNOWN";
+2 −1
Original line number Diff line number Diff line
@@ -746,7 +746,8 @@ tBTM_STATUS BTM_SetLinkPolicy(const RawAddress& remote_bda,
                    *settings);
    }
    if ((*settings & HCI_ENABLE_SNIFF_MODE) &&
        (!HCI_SNIFF_MODE_SUPPORTED(localFeatures))) {
        ((!HCI_SNIFF_MODE_SUPPORTED(localFeatures)) ||
         interop_match_addr(INTEROP_DISABLE_SNIFF, &remote_bda))) {
      *settings &= (~HCI_ENABLE_SNIFF_MODE);
      BTM_TRACE_API("BTM_SetLinkPolicy sniff not supported (settings: 0x%04x)",
                    *settings);
+3 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include "btm_int.h"
#include "btm_int_types.h"
#include "btu.h"
#include "device/include/interop.h"
#include "hcidefs.h"
#include "hcimsgs.h"
#include "l2c_int.h"
@@ -177,7 +178,8 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
    /* check if the requested mode is supported */
    ind = mode - BTM_PM_MD_HOLD; /* make it base 0 */
    p_features = BTM_ReadLocalFeatures();
    if (!(p_features[btm_pm_mode_off[ind]] & btm_pm_mode_msk[ind])) {
    if (!(p_features[btm_pm_mode_off[ind]] & btm_pm_mode_msk[ind]) ||
            interop_match_addr(INTEROP_DISABLE_SNIFF, &remote_bda)) {
      LOG(ERROR) << __func__ << ": pm_id " << unsigned(pm_id) << " mode "
                 << unsigned(mode) << " is not supported for " << remote_bda;
      return BTM_MODE_UNSUPPORTED;