Loading system/gd/l2cap/classic/internal/link.cc +8 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,14 @@ void Link::Disconnect() { acl_connection_->Disconnect(hci::DisconnectReason::REMOTE_USER_TERMINATED_CONNECTION); } void Link::Encrypt() { acl_connection_->SetConnectionEncryption(hci::Enable::ENABLED); } void Link::Authenticate() { acl_connection_->AuthenticationRequested(); } std::shared_ptr<FixedChannelImpl> Link::AllocateFixedChannel(Cid cid, SecurityPolicy security_policy) { auto channel = fixed_channel_allocator_.AllocateChannel(cid, security_policy); data_pipeline_manager_.AttachChannel(cid, channel, l2cap::internal::DataPipelineManager::ChannelMode::BASIC); Loading system/gd/l2cap/classic/internal/link.h +4 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ class Link : public l2cap::internal::ILink { virtual void Disconnect(); virtual void Encrypt(); virtual void Authenticate(); // FixedChannel methods std::shared_ptr<FixedChannelImpl> AllocateFixedChannel(Cid cid, SecurityPolicy security_policy); Loading system/gd/l2cap/classic/internal/link_manager.cc +3 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,9 @@ void LinkManager::OnConnectSuccess(std::unique_ptr<hci::AclConnection> acl_conne auto fixed_channel_impl = link->AllocateFixedChannel(fixed_channel_service.first, SecurityPolicy()); fixed_channel_service.second->NotifyChannelCreation( std::make_unique<FixedChannel>(fixed_channel_impl, l2cap_handler_)); if (fixed_channel_service.first == kClassicPairingTriggerCid) { link->Authenticate(); } } if (pending_dynamic_channels_.find(device) != pending_dynamic_channels_.end()) { for (Psm psm : pending_dynamic_channels_[device]) { Loading Loading
system/gd/l2cap/classic/internal/link.cc +8 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,14 @@ void Link::Disconnect() { acl_connection_->Disconnect(hci::DisconnectReason::REMOTE_USER_TERMINATED_CONNECTION); } void Link::Encrypt() { acl_connection_->SetConnectionEncryption(hci::Enable::ENABLED); } void Link::Authenticate() { acl_connection_->AuthenticationRequested(); } std::shared_ptr<FixedChannelImpl> Link::AllocateFixedChannel(Cid cid, SecurityPolicy security_policy) { auto channel = fixed_channel_allocator_.AllocateChannel(cid, security_policy); data_pipeline_manager_.AttachChannel(cid, channel, l2cap::internal::DataPipelineManager::ChannelMode::BASIC); Loading
system/gd/l2cap/classic/internal/link.h +4 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ class Link : public l2cap::internal::ILink { virtual void Disconnect(); virtual void Encrypt(); virtual void Authenticate(); // FixedChannel methods std::shared_ptr<FixedChannelImpl> AllocateFixedChannel(Cid cid, SecurityPolicy security_policy); Loading
system/gd/l2cap/classic/internal/link_manager.cc +3 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,9 @@ void LinkManager::OnConnectSuccess(std::unique_ptr<hci::AclConnection> acl_conne auto fixed_channel_impl = link->AllocateFixedChannel(fixed_channel_service.first, SecurityPolicy()); fixed_channel_service.second->NotifyChannelCreation( std::make_unique<FixedChannel>(fixed_channel_impl, l2cap_handler_)); if (fixed_channel_service.first == kClassicPairingTriggerCid) { link->Authenticate(); } } if (pending_dynamic_channels_.find(device) != pending_dynamic_channels_.end()) { for (Psm psm : pending_dynamic_channels_[device]) { Loading