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

Commit beb341bf authored by Martin Brabham's avatar Martin Brabham Committed by Automerger Merge Worker
Browse files

Merge "Set original address as identity address" am: 1f8a0344 am: 414eb3fe...

Merge "Set original address as identity address" am: 1f8a0344 am: 414eb3fe am: c82bd9e8 am: 0ea82d9a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2058268



Change-Id: Id5a0d453aae5fdb9ca334c4fcf4936e20bb5e1fb
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 50adcaad 0ea82d9a
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -1775,6 +1775,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()) {
@@ -1844,13 +1854,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;