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

Commit a82007ec authored by Omair Kamil's avatar Omair Kamil Committed by Gerrit Code Review
Browse files

Merge "Interop fix to not read PPCP for devices that report incompatible values." into main

parents a02e60fa 99527fc6
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -31,8 +31,10 @@

#include "bta/dm/bta_dm_disc_int.h"
#include "bta/include/bta_gatt_api.h"
#include "btif/include/btif_storage.h"
#include "common/circular_buffer.h"
#include "common/strings.h"
#include "device/include/interop.h"
#include "internal_include/bt_target.h"
#include "main/shim/dumpsys.h"
#include "os/logging/log_adapter.h"
@@ -276,8 +278,17 @@ static void bta_dm_disc_result(tBTA_DM_SVC_RES& disc_result) {
    bta_dm_discovery_cb.service_search_cbacks.on_service_discovery_results(r.bd_addr, r.uuids,
                                                                           r.result);
  } else {
    char remote_name[BD_NAME_LEN] = "";
    bta_dm_discovery_cb.transports &= ~BT_TRANSPORT_LE;
    if (btif_storage_get_stored_remote_name(bta_dm_discovery_cb.peer_bdaddr, remote_name) &&
        interop_match_name(INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS, remote_name)) {
      // Some devices provide PPCP values that are incompatible with the device-side firmware.
      log::info("disable PPCP read: interop matched name {} address {}", remote_name,
                bta_dm_discovery_cb.peer_bdaddr);
    } else {
      log::info("reading PPCP");
      GAP_BleReadPeerPrefConnParams(bta_dm_discovery_cb.peer_bdaddr);
    }

    bta_dm_discovery_cb.service_search_cbacks.on_gatt_results(bta_dm_discovery_cb.peer_bdaddr,
                                                              disc_result.gatt_uuids,
+3 −0
Original line number Diff line number Diff line
@@ -194,6 +194,9 @@ Motorola Keyboard KZ500 v122 = Name_Based
[INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS]
BSMBB09DS = Name_Based
ELECOM = Name_Based
Dexcom = Name_Based
DXCM = Name_Based
DX0 = Name_Based

# Disable role switch for headsets/car-kits
# Some car kits allow role switch but when DUT initiates role switch
+3 −0
Original line number Diff line number Diff line
@@ -365,6 +365,9 @@ TEST_F(InteropTest, test_name_hit) {
                                 "Targus BT Laser Notebook Mouse"));
  EXPECT_TRUE(interop_match_name(INTEROP_REMOVE_HID_DIG_DESCRIPTOR, "Motorola Keyboard KZ500"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS, "BSMBB09DS"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS, "DXCMog"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS, "Dexcom 123"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS, "DX01ab"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_AAC_CODEC, "abramtek M1"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_AAC_VBR_CODEC, "Audi_MMI_2781"));
  EXPECT_TRUE(interop_match_name(INTEROP_DISABLE_AVDTP_RECONFIGURE, "KMM-BT51*HD"));