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

Commit 87ece459 authored by Zach Johnson's avatar Zach Johnson
Browse files

Remove remnants of classic pairing cid

Bug: 145638034
Test: cert/run --host
Tag: #gd-refactor
Change-Id: If329983ce0d3a3d9f978d469945f27df774b63a4
parent bc7af664
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -36,7 +36,5 @@ constexpr Cid kLeSignallingCid = 5;
constexpr Cid kSmpCid = 6;
constexpr Cid kSmpBrCid = 7;

constexpr Cid kClassicPairingTriggerCid = kLastFixedChannel - 1;

}  // namespace l2cap
}  // namespace bluetooth
+0 −16
Original line number Diff line number Diff line
@@ -52,9 +52,6 @@ void LinkManager::ConnectFixedChannelServices(hci::Address device,
        // This channel is already allocated for this link, do not allocated twice
        continue;
      }
      if (fixed_channel_service.first == kClassicPairingTriggerCid) {
        this->TriggerPairing(link);
      }
      // Allocate channel for newly registered fixed channels
      auto fixed_channel_impl = link->AllocateFixedChannel(fixed_channel_service.first);
      fixed_channel_service.second->NotifyChannelCreation(
@@ -129,16 +126,6 @@ Link* LinkManager::GetLink(const hci::Address device) {
  return &links_.find(device)->second;
}

void LinkManager::TriggerPairing(Link* link) {
  if (!link->IsAuthenticated()) {
    link->Authenticate();
  }
  link->ReadRemoteVersionInformation();
  link->ReadRemoteSupportedFeatures();
  link->ReadRemoteExtendedFeatures();
  link->ReadClockOffset();
}

void LinkManager::handle_link_security_hold(hci::Address remote) {
  auto link = GetLink(remote);
  if (link == nullptr) {
@@ -229,9 +216,6 @@ void LinkManager::OnConnectSuccess(std::unique_ptr<hci::acl_manager::ClassicAclC
    auto fixed_channel_impl = link->AllocateFixedChannel(fixed_channel_service.first);
    fixed_channel_service.second->NotifyChannelCreation(
        std::make_unique<FixedChannel>(fixed_channel_impl, l2cap_handler_));
    if (fixed_channel_service.first == kClassicPairingTriggerCid) {
      this->TriggerPairing(link);
    }
  }
  if (pending_dynamic_channels_.find(device) != pending_dynamic_channels_.end()) {
    auto psm_list = pending_dynamic_channels_[device];
+0 −2
Original line number Diff line number Diff line
@@ -80,8 +80,6 @@ class LinkManager : public hci::acl_manager::ConnectionCallbacks {
  void RegisterLinkSecurityInterfaceListener(os::Handler* handler, LinkSecurityInterfaceListener* listener);

 private:
  void TriggerPairing(Link* link);

  // Handles requests from LinkSecurityInterface
  friend class LinkSecurityInterfaceImpl;
  void handle_link_security_hold(hci::Address remote);