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

Commit 7d86e7c8 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "Use identity addr in BLE scan filter"

parents 995cbbe3 02d428cc
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -499,6 +499,19 @@ void BTM_LE_PF_addr_filter(tBTM_BLE_SCAN_COND_OP action,
  UINT8_TO_STREAM(p, filt_index);

  if (action != BTM_BLE_SCAN_COND_CLEAR) {
#if (BLE_PRIVACY_SPT == TRUE)
    if (addr.type == BLE_ADDR_PUBLIC_ID) {
      LOG(INFO) << __func__ << " Filter address " << addr.bda
                << " has type PUBLIC_ID, try to get identity address";
      /* If no matching identity address is found for the input address,
       * this call will have no effect. */
      btm_random_pseudo_to_identity_addr(&addr.bda, &addr.type);
    }
#endif

    LOG(INFO) << __func__
              << " Adding scan filter with peer address: " << addr.bda;

    BDADDR_TO_STREAM(p, addr.bda);
    UINT8_TO_STREAM(p, addr.type);
  }