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

Commit a08a733d authored by Chris Manton's avatar Chris Manton
Browse files

[15/19] get_btm_client_interface().peer.BTM_RequestPeerSCA

Bug: 343772702
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I9813e69eee3701d3029adea5e08c2898ab1c2b56
parent d8ed7e6b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@
#include "content_control_id_keeper.h"
#include "devices.h"
#include "hci/controller_interface.h"
#include "internal_include/bt_trace.h"
#include "internal_include/stack_config.h"
#include "le_audio_health_status.h"
#include "le_audio_set_configuration_provider.h"
@@ -52,12 +51,12 @@
#include "le_audio_utils.h"
#include "main/shim/entry.h"
#include "metrics_collector.h"
#include "os/log.h"
#include "osi/include/osi.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/acl_api.h"
#include "stack/include/bt_types.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/main_thread.h"
#include "state_machine.h"
#include "storage_helper.h"
@@ -2100,7 +2099,7 @@ class LeAudioClientImpl : public LeAudioClient {
      BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
    }

    BTM_RequestPeerSCA(leAudioDevice->address_, transport);
    get_btm_client_interface().peer.BTM_RequestPeerSCA(leAudioDevice->address_, transport);

    if (leAudioDevice->GetConnectionState() ==
        DeviceConnectState::CONNECTING_AUTOCONNECT) {
+4 −5
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ void bluetooth::manager::SetMockBtmInterface(
                                                     tBT_TRANSPORT transport) {
    return btm_interface->GetPeerSCA(remote_bda, transport);
  };
  mock_btm_client_interface.peer.BTM_RequestPeerSCA = [](RawAddress const& bd_addr,
                                                         tBT_TRANSPORT transport) {
    btm_interface->RequestPeerSCA(bd_addr, transport);
  };
}

bool BTM_IsLinkKeyKnown(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
@@ -81,11 +85,6 @@ tBTM_SEC_DEV_REC* btm_find_dev(const RawAddress& bd_addr) {
  return btm_interface->FindDevice(bd_addr);
}

void BTM_RequestPeerSCA(RawAddress const& bd_addr, tBT_TRANSPORT transport) {
  log::assert_that(btm_interface != nullptr, "Mock btm interface not set!");
  btm_interface->RequestPeerSCA(bd_addr, transport);
}

void acl_disconnect_from_handle(uint16_t handle, tHCI_STATUS reason,
                                std::string comment) {
  log::assert_that(btm_interface != nullptr, "Mock btm interface not set!");