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

Commit 0c34ccf0 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Use identity addr in BLE scan filter"

am: 7d86e7c8

Change-Id: Iad5b0b9d3da84e77941f369837d0cd8e71f32e4a
parents 09d1388f 7d86e7c8
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);
  }