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

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

legacy: Remove write once read never field bta/dm/bta_dm_int::tBTA_DM_CB

Bug: 191555414
Tag: #refactor
Test: gd/cert/run

Change-Id: Ia1b3ec0439cf7bfc442050b56be45bd521c41c3c
parent 6c81453f
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -264,8 +264,6 @@ void bta_dm_enable(tBTA_DM_SEC_CBACK* p_sec_cback) {
  previous one,
  previous one,
  it could be an error recovery mechanism */
  it could be an error recovery mechanism */
  if (p_sec_cback != NULL) bta_dm_cb.p_sec_cback = p_sec_cback;
  if (p_sec_cback != NULL) bta_dm_cb.p_sec_cback = p_sec_cback;
  /* notify BTA DM is now active */
  bta_dm_cb.is_bta_dm_active = true;


  btm_local_io_caps = btif_storage_get_local_io_caps();
  btm_local_io_caps = btif_storage_get_local_io_caps();
}
}
@@ -328,9 +326,6 @@ void BTA_dm_on_hw_off() {
  osi_free(bta_dm_search_cb.p_pending_search);
  osi_free(bta_dm_search_cb.p_pending_search);
  fixed_queue_free(bta_dm_search_cb.pending_discovery_queue, osi_free);
  fixed_queue_free(bta_dm_search_cb.pending_discovery_queue, osi_free);
  memset(&bta_dm_search_cb, 0, sizeof(bta_dm_search_cb));
  memset(&bta_dm_search_cb, 0, sizeof(bta_dm_search_cb));

  /* notify BTA DM is now unactive */
  bta_dm_cb.is_bta_dm_active = false;
}
}


void BTA_dm_on_hw_on() {
void BTA_dm_on_hw_on() {
@@ -345,7 +340,6 @@ void BTA_dm_on_hw_on() {
  bta_dm_init_cb();
  bta_dm_init_cb();
  /* and retrieve the callback */
  /* and retrieve the callback */
  bta_dm_cb.p_sec_cback = temp_cback;
  bta_dm_cb.p_sec_cback = temp_cback;
  bta_dm_cb.is_bta_dm_active = true;


  /* hw is ready, go on with BTA DM initialization */
  /* hw is ready, go on with BTA DM initialization */
  alarm_free(bta_dm_search_cb.search_timer);
  alarm_free(bta_dm_search_cb.search_timer);
+0 −1
Original line number Original line Diff line number Diff line
@@ -310,7 +310,6 @@ extern tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs;


/* DM control block */
/* DM control block */
typedef struct {
typedef struct {
  bool is_bta_dm_active;
  tBTA_DM_ACTIVE_LINK device_list;
  tBTA_DM_ACTIVE_LINK device_list;
  tBTA_DM_SEC_CBACK* p_sec_cback;
  tBTA_DM_SEC_CBACK* p_sec_cback;
  tBTA_BLE_ENERGY_INFO_CBACK* p_energy_info_cback;
  tBTA_BLE_ENERGY_INFO_CBACK* p_energy_info_cback;