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

Commit 989e7016 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Android Build Coastguard Worker
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
(cherry picked from https://android-review.googlesource.com/q/commit:210dc68e1c651be67f082c363b02d9ad9c27867d)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:676912276ffeed8657bb20ed905c2b28d45620bc)
Merged-In: I0ba1470922c9da4c25bef0582fbc8bfa118523e6
Change-Id: I0ba1470922c9da4c25bef0582fbc8bfa118523e6
parent 23591474
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1426,12 +1426,12 @@ bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr,

  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);