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

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

mock: [14/63] Remove BTM_default_unblock_role_switch

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: I2b09973d114278d755a7816653cc325e030ab96c
parent 92a79539
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2401,7 +2401,7 @@ void bta_av_str_closed(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {

  BTM_unblock_role_switch_and_sniff_mode_for(p_scb->PeerAddress());
  if (bta_av_cb.audio_open_cnt <= 1) {
    BTM_default_unblock_role_switch();
    get_btm_client_interface().link_policy.BTM_default_unblock_role_switch();
  }

  L2CA_SetMediaStreamChannel(p_scb->l2c_cid, false);
+2 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/l2c_api.h"
#include "stack/include/sdp_api.h"
#include "types/raw_address.h"
@@ -1349,7 +1350,7 @@ void bta_av_conn_chg(tBTA_AV_DATA* p_data) {
    if (p_cb->audio_open_cnt == 1) {
      /* one audio channel goes down and there's one audio channel remains open.
       * restore the switch role in default link policy */
      BTM_default_unblock_role_switch();
      get_btm_client_interface().link_policy.BTM_default_unblock_role_switch();
      bta_av_restore_switch();
    }
    if (p_cb->audio_open_cnt) {
+0 −5
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ struct BTM_ReadConnectionAddr BTM_ReadConnectionAddr;
struct BTM_RequestPeerSCA BTM_RequestPeerSCA;
struct BTM_acl_after_controller_started BTM_acl_after_controller_started;
struct btm_connection_request btm_connection_request;
struct BTM_default_unblock_role_switch BTM_default_unblock_role_switch;
struct BTM_unblock_role_switch_for BTM_unblock_role_switch_for;
struct BTM_unblock_sniff_mode_for BTM_unblock_sniff_mode_for;
struct acl_disconnect_after_role_switch acl_disconnect_after_role_switch;
@@ -351,10 +350,6 @@ void BTM_acl_after_controller_started() {
  inc_func_call_count(__func__);
  test::mock::stack_acl::BTM_acl_after_controller_started();
}
void BTM_default_unblock_role_switch() {
  inc_func_call_count(__func__);
  test::mock::stack_acl::BTM_default_unblock_role_switch();
}
void BTM_unblock_role_switch_for(const RawAddress& peer_addr) {
  inc_func_call_count(__func__);
  test::mock::stack_acl::BTM_unblock_role_switch_for(peer_addr);
+0 −8
Original line number Diff line number Diff line
@@ -538,14 +538,6 @@ struct BTM_acl_after_controller_started {
  void operator()() { body(); }
};
extern struct BTM_acl_after_controller_started BTM_acl_after_controller_started;
// Name: BTM_default_unblock_role_switch
// Params:
// Returns: void
struct BTM_default_unblock_role_switch {
  std::function<void()> body{[]() { ; }};
  void operator()() { body(); }
};
extern struct BTM_default_unblock_role_switch BTM_default_unblock_role_switch;
// Name: BTM_unblock_role_switch_for
// Params: const RawAddress& peer_addr
// Returns: void