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

Commit 1f8a0344 authored by Martin Brabham's avatar Martin Brabham Committed by Gerrit Code Review
Browse files

Merge "Set original address as identity address"

parents 77f0667f a3abd7f1
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -1772,6 +1772,16 @@ public class GattService extends ProfileService {
                    + ", originalAddress=" + originalAddress);
        }

        String identityAddress = mAdapterService.getIdentityAddress(address);
        if (!address.equals(identityAddress)) {
            if (VDBG) {
                Log.d(TAG, "found identityAddress of " + address + ", replace originalAddress as "
                        + identityAddress);
            }
            originalAddress = identityAddress;
        }


        byte[] legacyAdvData = Arrays.copyOfRange(advData, 0, 62);

        for (ScanClient client : mScanManager.getRegularScanQueue()) {
@@ -1841,13 +1851,6 @@ public class GattService extends ProfileService {
                continue;
            }

            if (matchResult.getMatchOrigin() == MatchOrigin.ORIGINAL_ADDRESS) {
                result = new ScanResult(BluetoothAdapter.getDefaultAdapter()
                        .getRemoteDevice(originalAddress), eventType, primaryPhy, secondaryPhy,
                        advertisingSid, txPower, rssi, periodicAdvInt, scanRecord,
                        SystemClock.elapsedRealtimeNanos());
            }

            if ((settings.getCallbackType() & ScanSettings.CALLBACK_TYPE_ALL_MATCHES) == 0) {
                if (VDBG) {
                    Log.d(TAG, "Skipping client: CALLBACK_TYPE_ALL_MATCHES");
+6 −0
Original line number Diff line number Diff line
@@ -370,6 +370,12 @@ void BleScannerInterfaceImpl::OnTrackAdvFoundLost(
  AdvertisingTrackInfo track_info = {};
  RawAddress raw_address =
      ToRawAddress(on_found_on_lost_info.advertiser_address);

  if (on_found_on_lost_info.advertiser_address_type != BLE_ADDR_ANONYMOUS) {
    btm_ble_process_adv_addr(raw_address,
                             &on_found_on_lost_info.advertiser_address_type);
  }

  track_info.advertiser_address = raw_address;
  track_info.advertiser_address_type =
      on_found_on_lost_info.advertiser_address_type;