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

Commit d41e8ed3 authored by Chienyuan's avatar Chienyuan
Browse files

GATT: Use BT_TRANSPORT_LE when address type is Random

Bug: 226046191
Tag: #refactor
Test: gd/cert/run
Test: Scan dual-mode device, connectGatt with TRANSPORT_AUTO
Change-Id: I6039820d1cda69df14e08e11c381e7329efdc1fc
parent 3d794a25
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -339,7 +339,7 @@ void btif_gattc_open_impl(int client_if, RawAddress address, bool is_direct,
        break;
        break;


      case BT_DEVICE_TYPE_DUMO:
      case BT_DEVICE_TYPE_DUMO:
        if (transport_p == BT_TRANSPORT_LE)
        if (addr_type == BLE_ADDR_RANDOM)
          transport = BT_TRANSPORT_LE;
          transport = BT_TRANSPORT_LE;
        else
        else
          transport = BT_TRANSPORT_BR_EDR;
          transport = BT_TRANSPORT_BR_EDR;
@@ -348,8 +348,8 @@ void btif_gattc_open_impl(int client_if, RawAddress address, bool is_direct,
  }
  }


  // Connect!
  // Connect!
  BTIF_TRACE_DEBUG("%s Transport=%d, device type=%d, phy=%d", __func__,
  LOG_INFO("%s Transport=%d, device type=%d, address type =%d, phy=%d",
                   transport, device_type, initiating_phys);
           __func__, transport, device_type, addr_type, initiating_phys);
  BTA_GATTC_Open(client_if, address, is_direct, transport, opportunistic,
  BTA_GATTC_Open(client_if, address, is_direct, transport, opportunistic,
                 initiating_phys);
                 initiating_phys);
}
}