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

Commit b1389c5c authored by Myles Watson's avatar Myles Watson
Browse files

SecurityManager: Call Init in the constructor

Bug: 145638034
Test: SecurityManager facade tests in ./cert/run_tests_facade_only.sh
Change-Id: I5ac735aa35177aa2cf34e0842dd0fd2a95347b30
parent 7f40aab9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -48,9 +48,6 @@ class SecurityManagerChannel {
        hci_security_interface_(hci_layer->GetSecurityInterface(
            common::Bind(&SecurityManagerChannel::OnHciEventReceived, common::Unretained(this)), handler)),
        handler_(handler) {}
  ~SecurityManagerChannel() {
    delete listener_;
  }

  /**
   * Send a given SMP command over the SecurityManagerChannel
+1 −0
Original line number Diff line number Diff line
@@ -251,6 +251,7 @@ SecurityManagerImpl::SecurityManagerImpl(os::Handler* security_handler, l2cap::l
      hci_security_interface_le_(hci_layer->GetLeSecurityInterface(
          common::Bind(&SecurityManagerImpl::OnHciLeEvent, common::Unretained(this)), security_handler)),
      security_manager_channel_(security_manager_channel) {
  Init();
  l2cap_manager_le_->RegisterService(
      bluetooth::l2cap::kSmpCid, {},
      common::BindOnce(&SecurityManagerImpl::OnL2capRegistrationCompleteLe, common::Unretained(this)),
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ class SecurityManagerImpl : public channel::ISecurityManagerChannelListener {
  l2cap::classic::L2capClassicModule* l2cap_classic_module_ __attribute__((unused));
  std::unique_ptr<l2cap::le::FixedChannelManager> l2cap_manager_le_;
  hci::LeSecurityInterface* hci_security_interface_le_ __attribute__((unused));
  channel::SecurityManagerChannel* security_manager_channel_ __attribute__((unused));
  channel::SecurityManagerChannel* security_manager_channel_;
  std::unordered_map<hci::Address, std::shared_ptr<record::SecurityRecord>> security_record_map_;
  std::unordered_map<hci::Address, std::shared_ptr<pairing::PairingHandler>> pairing_handler_map_;
};