Loading system/main/shim/acl.cc +26 −25 Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ #include <base/location.h> #include <base/strings/stringprintf.h> #include <time.h> #include <chrono> #include <cstdint> #include <functional> Loading Loading @@ -588,6 +588,8 @@ struct bluetooth::shim::legacy::Acl::impl { void EnqueueClassicPacket( HciHandle handle, std::unique_ptr<bluetooth::packet::RawBuilder> packet) { ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->EnqueuePacket(std::move(packet)); } Loading @@ -596,32 +598,30 @@ struct bluetooth::shim::legacy::Acl::impl { handle_to_le_connection_map_.end(); } bool ClassicConnectionExists(HciHandle handle) { return handle_to_classic_connection_map_.find(handle) != handle_to_classic_connection_map_.end(); } void EnqueueLePacket(HciHandle handle, std::unique_ptr<bluetooth::packet::RawBuilder> packet) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsLeAcl(handle), "handle %d is not a LE connection", handle); handle_to_le_connection_map_[handle]->EnqueuePacket(std::move(packet)); } void HoldMode(HciHandle handle, uint16_t max_interval, uint16_t min_interval) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->HoldMode(max_interval, min_interval); } void ExitSniffMode(HciHandle handle) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->ExitSniffMode(); } void SniffMode(HciHandle handle, uint16_t max_interval, uint16_t min_interval, uint16_t attempt, uint16_t timeout) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->SniffMode( max_interval, min_interval, attempt, timeout); } Loading @@ -629,15 +629,16 @@ struct bluetooth::shim::legacy::Acl::impl { void SniffSubrating(HciHandle handle, uint16_t maximum_latency, uint16_t minimum_remote_timeout, uint16_t minimum_local_timeout) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->SniffSubrating( maximum_latency, minimum_remote_timeout, minimum_local_timeout); } void SetConnectionEncryption(HciHandle handle, hci::Enable enable) { if (ClassicConnectionExists(handle)) handle_to_classic_connection_map_[handle]->SetConnectionEncryption( enable); ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->SetConnectionEncryption(enable); } void DumpConnectionHistory() const { Loading Loading
system/main/shim/acl.cc +26 −25 Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ #include <base/location.h> #include <base/strings/stringprintf.h> #include <time.h> #include <chrono> #include <cstdint> #include <functional> Loading Loading @@ -588,6 +588,8 @@ struct bluetooth::shim::legacy::Acl::impl { void EnqueueClassicPacket( HciHandle handle, std::unique_ptr<bluetooth::packet::RawBuilder> packet) { ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->EnqueuePacket(std::move(packet)); } Loading @@ -596,32 +598,30 @@ struct bluetooth::shim::legacy::Acl::impl { handle_to_le_connection_map_.end(); } bool ClassicConnectionExists(HciHandle handle) { return handle_to_classic_connection_map_.find(handle) != handle_to_classic_connection_map_.end(); } void EnqueueLePacket(HciHandle handle, std::unique_ptr<bluetooth::packet::RawBuilder> packet) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsLeAcl(handle), "handle %d is not a LE connection", handle); handle_to_le_connection_map_[handle]->EnqueuePacket(std::move(packet)); } void HoldMode(HciHandle handle, uint16_t max_interval, uint16_t min_interval) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->HoldMode(max_interval, min_interval); } void ExitSniffMode(HciHandle handle) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->ExitSniffMode(); } void SniffMode(HciHandle handle, uint16_t max_interval, uint16_t min_interval, uint16_t attempt, uint16_t timeout) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->SniffMode( max_interval, min_interval, attempt, timeout); } Loading @@ -629,15 +629,16 @@ struct bluetooth::shim::legacy::Acl::impl { void SniffSubrating(HciHandle handle, uint16_t maximum_latency, uint16_t minimum_remote_timeout, uint16_t minimum_local_timeout) { if (ClassicConnectionExists(handle)) ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->SniffSubrating( maximum_latency, minimum_remote_timeout, minimum_local_timeout); } void SetConnectionEncryption(HciHandle handle, hci::Enable enable) { if (ClassicConnectionExists(handle)) handle_to_classic_connection_map_[handle]->SetConnectionEncryption( enable); ASSERT_LOG(IsClassicAcl(handle), "handle %d is not a classic connection", handle); handle_to_classic_connection_map_[handle]->SetConnectionEncryption(enable); } void DumpConnectionHistory() const { Loading