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

Commit 3c2eac8c authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

Corrected the incorrect log placement.

The log was intended to detect devices
that are not BLE, but it functioned incorrectly
and identified BLE devices instead.

Bug: 349479600
Test: m -j;
Flag: EXEMPT, change log only
Change-Id: Ia4d2b87a08662513178c307652d8a5a2bf6c8997
parent 2d10c8e5
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -686,12 +686,16 @@ std::vector<tBTM_SEC_DEV_REC*> btm_get_sec_dev_rec() {
bool BTM_Sec_AddressKnown(const RawAddress& address) {
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(address);

  //  not a known device, or a classic device, we assume public address
  if (p_dev_rec == NULL || (p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) == 0)
  // not a known device, we assume public address
  if (p_dev_rec == NULL) {
    log::warn("{}, unknown device", address);
    return true;

  log::warn("{}, device type not BLE: 0x{:02x}", address,
            p_dev_rec->device_type);
  }
  // a classic device, we assume public address
  if ((p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) == 0) {
    log::warn("{}, device type not BLE: 0x{:02x}", address, p_dev_rec->device_type);
    return true;
  }

  // bonded device with identity address known
  if (!p_dev_rec->ble.identity_address_with_type.bda.IsEmpty()) {