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

Commit 10593c49 authored by Josh Wu's avatar Josh Wu
Browse files

BLE: Do not rewrite devtype in BTM_ReadDevInfo()

During a classic pairing process, receiving new inq results may turn
devtype info LE and stop the followiing SDP process. Also, it's
relatively impossible to change device type.

Bug: 263544601
Test: atest BluetoothInstrumentationTests
Change-Id: I9a2ca1210114b60d1f26bf61939a93f6f28f1e16
parent cdcb2c1f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -516,9 +516,9 @@ void BTM_ReadDevInfo(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
    }
  } else /* there is a security device record exisitng */
  {
    /* new inquiry result, overwrite device type in security device record */
    /* new inquiry result, merge device type in security device record */
    if (p_inq_info) {
      p_dev_rec->device_type = p_inq_info->results.device_type;
      p_dev_rec->device_type |= p_inq_info->results.device_type;
      if (is_ble_addr_type_known(p_inq_info->results.ble_addr_type))
        p_dev_rec->ble.SetAddressType(p_inq_info->results.ble_addr_type);
      else