OSDN Git Service

BLE advertisement processing: use stored report address type when match is found
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 25 Sep 2019 08:56:49 +0000 (10:56 +0200)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 25 Sep 2019 12:30:02 +0000 (14:30 +0200)
Inside btm_ble_process_adv_addr, when we find a match to existing
security record, we should use not only the address, but also the
address type of the existing record.

Bug: 141186673
Bug: 139825901
Bug: 140847046
Test: Bond with device using it's public address, then scan and find it
      using it's random address, verify bt_config.conf file content.
Change-Id: I313d54d1e53d06ae292480d195653f0212a3d681
(cherry-picked from a5835743d43b0f7bf5b9864a8090a8a6b8d127a5)

stack/btm/btm_ble_gap.cc

index c46acf0..05cac15 100644 (file)
@@ -1755,6 +1755,7 @@ void btm_ble_process_adv_addr(RawAddress& bda, uint8_t* addr_type) {
       } else {
         // Assign the original address to be the current report address
         bda = match_rec->ble.pseudo_addr;
+        *addr_type = match_rec->ble.ble_addr_type;
       }
     }
   }