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

Commit a016abc6 authored by IHLHO KIM's avatar IHLHO KIM
Browse files

Don't change address type of address filter

btm_random_pseudo_to_identity_addr() change address type into 3 If the remote device distributed static random address as an ID address.
Address type 3 is not defined in Google VSC so the controller returns 'INVALID HCI COMMAND PARAMETERS' error.
Filter scan doesn't work in this case.

Bug: 194260436
Change-Id: I52013a1862bbd6588b8f470720bdaa9914f7a49f
Tag: #refactor
Test: manual
parent 19493630
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -476,12 +476,13 @@ static 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 (addr.type == BLE_ADDR_PUBLIC_ID) {
    if (addr.type == 2 /* DEVICE_TYPE_ALL in ScanFilterQueue.java */) {
      LOG(INFO) << __func__ << " Filter address " << addr.bda
                << " has type PUBLIC_ID, try to get identity address";
                << " has DEVICE_TYPE_ALL, 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);
      uint8_t dummy_addr_type;
      btm_random_pseudo_to_identity_addr(&addr.bda, &dummy_addr_type);
    }

    LOG(INFO) << __func__