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

Commit bdb541ea authored by Christine Hallstrom's avatar Christine Hallstrom
Browse files

Skip EATT connect for LL version < BT 5.0

Follow-on change to skip EATT connect for BT LL version < 5.0 instead of
<5.2, since EATT is software feature. Also address nit from previous
patch.

Bug: 284511042
Test: m com.android.btservices | Manual: Ensure EATT doesn't connect
when LL version reported <5, and does connect when 5 or greater.

Change-Id: Ia252310df932d1e62ff66a4c1407dd299852de4b
parent ccc3bce6
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1517,16 +1517,15 @@ void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) {
  }

  if (encr_enable) {
    uint8_t remote_lmp_version = 0;
    if (!BTM_ReadRemoteVersion(p_dev_rec->ble.pseudo_addr, &remote_lmp_version,
    uint8_t remote_ll_version = 0;
    if (!BTM_ReadRemoteVersion(p_dev_rec->ble.pseudo_addr, &remote_ll_version,
                               nullptr, nullptr) ||
        remote_lmp_version == 0) {
        remote_ll_version == 0) {
      LOG_WARN("BLE Unable to determine remote version");
    }

    if (remote_lmp_version == 0 ||
        remote_lmp_version >= HCI_PROTO_VERSION_5_2) {
      /* Link is encrypted, start EATT if remote LMP version is unknown, or 5.2
    if (remote_ll_version == 0 || remote_ll_version >= HCI_PROTO_VERSION_5_0) {
      /* Link is encrypted, start EATT if remote LMP version is unknown, or 5.0
       * or greater */
      bluetooth::eatt::EattExtension::GetInstance()->Connect(
          p_dev_rec->ble.pseudo_addr);