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

Commit 210dc68e authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

Enable GATT Connection over BR/EDR

Fix bug where the enabled flag incorrectly
prevented GATT connection over BR/EDR by
ignoring transport parameters.

Bug: 325595120
Bug: 348161961
Test: atest BluetoothInstrumentationTests
Change-Id: I0ba1470922c9da4c25bef0582fbc8bfa118523e6
parent 2bf4c772
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1405,10 +1405,12 @@ bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, tBLE_ADDR_TYPE ad

  bool ret = false;
  if (is_direct) {
    log::debug("Starting direct connect gatt_if={} address={}", gatt_if, bd_addr);
    log::debug("Starting direct connect gatt_if={} address={} transport={}", gatt_if, bd_addr,
               transport);
    bool tcb_exist = !!gatt_find_tcb_by_addr(bd_addr, transport);

    if (!com::android::bluetooth::flags::gatt_reconnect_on_bt_on_fix() || tcb_exist) {
    if (!com::android::bluetooth::flags::gatt_reconnect_on_bt_on_fix() || tcb_exist ||
        transport == BT_TRANSPORT_BR_EDR) {
      /* Consider to remove gatt_act_connect at all */
      ret = gatt_act_connect(p_reg, bd_addr, addr_type, transport, initiating_phys);
    } else {