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

Commit d89db029 authored by Chris Manton's avatar Chris Manton
Browse files

btm_history: Log start and stop le scanning

Bug: 188074901
Tag: #refactor
Test: gd/cert/run

Change-Id: Id1301da0a146cb71fcbc7970af8887ab9bce860d
parent 7869b4ba
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -33,16 +33,22 @@
#include "gd/storage/device.h"
#include "gd/storage/le_device.h"
#include "gd/storage/storage_module.h"
#include "main/shim/dumpsys.h"
#include "main/shim/entry.h"
#include "main/shim/helpers.h"
#include "main/shim/shim.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/btm_log_history.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"

using bluetooth::ToRawAddress;
using bluetooth::ToGdAddress;

namespace {
constexpr char kBtmLogTag[] = "SCAN";
}

extern void btm_ble_process_adv_pkt_cont_for_inquiry(
    uint16_t event_type, uint8_t address_type, const RawAddress& raw_address,
    uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
@@ -83,6 +89,9 @@ class BleScannerInterfaceImpl : public BleScannerInterface,
  void Scan(bool start) {
    LOG(INFO) << __func__ << " in shim layer";
    bluetooth::shim::GetScanning()->Scan(start);
    BTM_LogHistory(
        kBtmLogTag, RawAddress::kEmpty,
        base::StringPrintf("Le scan %s", (start) ? "started" : "stopped"));
    init_address_cache();
  }