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

Commit a92c688a authored by Zach Johnson's avatar Zach Johnson
Browse files

Remove bta_sys_clear_default_policy

Call through instead

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ife7deb79d4b1afe5f8fe9e10279242df1c0d24c8
parent e1dbdd84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -849,7 +849,7 @@ void bta_av_do_disc_a2dp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {

    if (bta_av_cb.audio_open_cnt == 1) {
      /* there's already an A2DP connection. do not allow switch */
      bta_sys_clear_default_policy(BTA_ID_AV, HCI_ENABLE_MASTER_SLAVE_SWITCH);
      BTA_dm_block_role_switch(BTA_ID_AV);
    }
  }
  /* store peer addr other parameters */
+2 −1
Original line number Diff line number Diff line
@@ -246,6 +246,7 @@ extern void bta_sys_set_policy(uint8_t id, uint8_t policy,
extern void bta_sys_clear_policy(uint8_t id, uint8_t policy,
                                 const RawAddress& peer_addr);
extern void bta_sys_set_default_policy(uint8_t id, uint8_t policy);
extern void bta_sys_clear_default_policy(uint8_t id, uint8_t policy);

void BTA_dm_block_role_switch(uint8_t app_id);

#endif /* BTA_SYS_H */
+0 −16
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
void BTA_dm_set_policy(uint8_t policy, const RawAddress& peer_addr);
void BTA_dm_clear_policy(uint8_t policy, const RawAddress& peer_addr);
void BTA_dm_unblock_role_switch(uint8_t app_id);
void BTA_dm_block_role_switch(uint8_t app_id);

/*******************************************************************************
 *
@@ -396,21 +395,6 @@ void bta_sys_set_default_policy(uint8_t id, uint8_t policy) {
  BTA_dm_unblock_role_switch(id);
}

/*******************************************************************************
 *
 * Function         bta_sys_clear_default_policy
 *
 * Description      Called by BTA subsystems to indicate that the given default
 *                  link policy should be clear
 *
 * Returns          void
 *
 ******************************************************************************/
void bta_sys_clear_default_policy(uint8_t id, uint8_t policy) {
  APPL_TRACE_DEBUG("%s: id:%d policy:0x%x", __func__, id, policy);
  BTA_dm_block_role_switch(id);
}

/*******************************************************************************
 *
 * Function         bta_sys_idle