Home
last modified time | relevance | path

Searched refs:MetricIdAllocator (Results 1 – 8 of 8) sorted by relevance

/system/bt/test/mock/
Dmock_common_metric_id_allocator.cc46 const int MetricIdAllocator::kMinId = 0;
48 MetricIdAllocator::MetricIdAllocator() in MetricIdAllocator() function in bluetooth::common::MetricIdAllocator
57 class MockMetricIdAllocator : public MetricIdAllocator {
64 MetricIdAllocator& MetricIdAllocator::GetInstance() { in GetInstance()
68 MetricIdAllocator::~MetricIdAllocator() {} in ~MetricIdAllocator()
69 bool MetricIdAllocator::Close() { in Close()
73 bool MetricIdAllocator::Init( in Init()
79 bool MetricIdAllocator::IsEmpty() const { in IsEmpty()
83 bool MetricIdAllocator::IsValidId(const int id) { in IsValidId()
87 bool MetricIdAllocator::SaveDevice(const RawAddress& mac_address) { in SaveDevice()
[all …]
/system/bt/common/
Dmetric_id_allocator_unittest.cc28 using bluetooth::common::MetricIdAllocator;
45 device_map[kthAddress(key)] = key + MetricIdAllocator::kMinId; in generateAddresses()
51 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
53 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
62 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
64 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
75 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
77 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
82 EXPECT_EQ(allocator.AllocateId(kthAddress(0)), MetricIdAllocator::kMinId); in TEST()
83 EXPECT_EQ(allocator.AllocateId(kthAddress(1)), MetricIdAllocator::kMinId + 1); in TEST()
[all …]
Dmetric_id_allocator.cc30 const std::string MetricIdAllocator::LOGGING_TAG = "BluetoothMetricIdAllocator";
31 const size_t MetricIdAllocator::kMaxNumUnpairedDevicesInMemory = 200;
32 const size_t MetricIdAllocator::kMaxNumPairedDevicesInMemory = 65000;
33 const int MetricIdAllocator::kMinId = 1;
34 const int MetricIdAllocator::kMaxId = 65534; // 2^16 - 2
38 static_assert((MetricIdAllocator::kMaxNumUnpairedDevicesInMemory +
39 MetricIdAllocator::kMaxNumPairedDevicesInMemory) <
40 (MetricIdAllocator::kMaxId - MetricIdAllocator::kMinId),
44 MetricIdAllocator::MetricIdAllocator() in MetricIdAllocator() function in bluetooth::common::MetricIdAllocator
48 bool MetricIdAllocator::Init( in Init()
[all …]
Dmetric_id_allocator.h33 class MetricIdAllocator {
43 ~MetricIdAllocator();
50 static MetricIdAllocator& GetInstance();
116 MetricIdAllocator();
134 MetricIdAllocator(MetricIdAllocator const&) = delete;
135 MetricIdAllocator& operator=(MetricIdAllocator const&) = delete;
Dmetrics.cc583 metric_id = MetricIdAllocator::GetInstance().AllocateId(*address); in LogLinkLayerConnectionEvent()
633 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogA2dpAudioUnderrunEvent()
660 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogA2dpAudioOverrunEvent()
687 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogA2dpPlaybackEvent()
710 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogReadRssiResult()
733 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogReadFailedContactCounterResult()
757 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogReadTxPowerLevelResult()
781 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogSmpPairingEvent()
804 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogClassicPairingEvent()
828 metric_id = MetricIdAllocator::GetInstance().AllocateId(address); in LogSdpAttribute()
[all …]
/system/bt/btif/src/
Dbtif_metrics_logging.cc125 return bluetooth::common::MetricIdAllocator::GetInstance().Init( in init_metric_id_allocator()
134 return bluetooth::common::MetricIdAllocator::GetInstance().Close(); in close_metric_id_allocator()
141 return bluetooth::common::MetricIdAllocator::GetInstance().AllocateId( in allocate_metric_id_from_metric_id_allocator()
149 return bluetooth::common::MetricIdAllocator::GetInstance().SaveDevice( in save_metric_id_from_metric_id_allocator()
157 bluetooth::common::MetricIdAllocator::GetInstance().ForgetDevice(address); in forget_device_from_metric_id_allocator()
165 return bluetooth::common::MetricIdAllocator::IsValidId(id); in is_valid_id_from_metric_id_allocator()
Dbtif_config.cc73 using bluetooth::common::MetricIdAllocator;
221 MetricIdAllocator::Callback save_device_callback = in init_metric_id_allocator()
226 MetricIdAllocator::Callback forget_device_callback = in init_metric_id_allocator()
/system/bt/main/shim/
Dbtm_api.cc41 using bluetooth::common::MetricIdAllocator;
468 MetricIdAllocator::GetInstance().AllocateId( in OnDeviceBonded()
474 : MetricIdAllocator::GetInstance().SaveDevice( in OnDeviceBonded()
490 MetricIdAllocator::GetInstance().ForgetDevice( in OnDeviceUnbonded()