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

Commit bb39bace authored by Charles Lin's avatar Charles Lin
Browse files

Update time stamp when new inq_db

Test: Simulate a sitution with many LE devices around and start le scan
Bug: 146474336
Change-Id: I3a0f87786d0c7b13e4d85942ac0387fc334c26d4
parent 11f37fb4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
#include "gattdefs.h"
#include "l2c_int.h"
#include "osi/include/log.h"
#include "common/time_util.h"

#include "main/shim/btm_api.h"
#include "main/shim/shim.h"
@@ -1995,11 +1996,13 @@ void btm_ble_process_adv_pkt_cont(uint16_t evt_type, uint8_t addr_type,
    p_i = btm_inq_db_new(bda);
    if (p_i != NULL) {
      p_inq->inq_cmpl_info.num_resp++;
      p_i->time_of_resp = bluetooth::common::time_get_os_boottime_ms();
    } else
      return;
  } else if (p_i->inq_count !=
             p_inq->inq_counter) /* first time seen in this inquiry */
  {
    p_i->time_of_resp = bluetooth::common::time_get_os_boottime_ms();
    p_inq->inq_cmpl_info.num_resp++;
  }