1818
1919#include " le_advertising_manager.h"
2020
21+ #include < base/logging.h>
2122#include < hardware/bluetooth.h>
2223#include < hardware/bt_gatt.h>
2324
3435#include " main/shim/helpers.h"
3536#include " stack/include/ble_advertiser.h"
3637#include " stack/include/btm_api.h"
38+ #include " stack/include/btm_log_history.h"
3739#include " types/raw_address.h"
3840
39- #include < base/logging.h>
40-
4141using bluetooth::hci::Address;
4242using bluetooth::hci::AddressType;
4343using bluetooth::hci::ErrorCode;
4444using bluetooth::hci::GapData;
4545using bluetooth::hci::OwnAddressType;
4646using std::vector;
4747
48+ namespace {
49+ constexpr char kBtmLogTag [] = " ADV" ;
50+ }
51+
4852class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface ,
4953 public bluetooth::hci::AdvertisingCallback {
5054 public:
@@ -63,6 +67,8 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface,
6367 void Unregister (uint8_t advertiser_id) override {
6468 LOG (INFO) << __func__ << " in shim layer" ;
6569 bluetooth::shim::GetAdvertising ()->RemoveAdvertiser (advertiser_id);
70+ BTM_LogHistory (kBtmLogTag , RawAddress::kEmpty , " Le advert stopped" ,
71+ base::StringPrintf (" advert_id:%d" , advertiser_id));
6672 }
6773
6874 void GetOwnAddress (uint8_t advertiser_id, GetAddressCallback cb) override {
@@ -187,6 +193,9 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface,
187193
188194 LOG (INFO) << " create advertising set, reg_id:" << reg_id
189195 << " , id:" << (uint16_t )id;
196+
197+ BTM_LogHistory (kBtmLogTag , RawAddress::kEmpty , " Le advert started" ,
198+ base::StringPrintf (" advert_id:%d" , reg_id));
190199 }
191200
192201 void SetPeriodicAdvertisingParameters (
0 commit comments