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

Commit 1a0ee193 authored by Zach Johnson's avatar Zach Johnson
Browse files

Delete bta_sys_sm_execute

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6946791bd0230cda59fa71fb541a062dff250160
parent 2d6310e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ typedef uint8_t tBTA_SYS_HW_EVT;
 *  Function declarations
 ****************************************************************************/
void bta_set_forward_hw_failures(bool value);
void BTA_sys_signal_hw_error();

extern void bta_sys_init(void);
extern void bta_sys_free(void);
@@ -185,7 +186,6 @@ extern void bta_sys_set_trace_level(uint8_t level);
extern void bta_sys_register(uint8_t id, const tBTA_SYS_REG* p_reg);
extern void bta_sys_deregister(uint8_t id);
extern bool bta_sys_is_register(uint8_t id);
extern void send_bta_sys_hw_event(tBTA_SYS_HW_EVT event);
extern void bta_sys_sendmsg(void* p_msg);
extern void bta_sys_sendmsg_delayed(void* p_msg, const base::TimeDelta& delay);
extern void bta_sys_start_timer(alarm_t* alarm, uint64_t interval_ms,
+2 −22
Original line number Diff line number Diff line
@@ -72,28 +72,8 @@ void bta_set_forward_hw_failures(bool value) {
  bta_sys_cb.forward_hw_failures = value;
}

/*******************************************************************************
 *
 * Function         bta_dm_sm_execute
 *
 * Description      State machine event handling function for DM
 *
 *
 * Returns          void
 *
 ******************************************************************************/
static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) {
  switch (event) {
    case BTA_SYS_ERROR_EVT:
      bta_sys_hw_error();
      break;
    default:
      break;
  }
}

void send_bta_sys_hw_event(tBTA_SYS_HW_EVT event) {
  do_in_main_thread(FROM_HERE, base::Bind(bta_sys_sm_execute, event));
void BTA_sys_signal_hw_error() {
  do_in_main_thread(FROM_HERE, base::Bind(bta_sys_hw_error));
}

/*******************************************************************************
+1 −1
Original line number Diff line number Diff line
@@ -1536,7 +1536,7 @@ static void btu_hcif_hardware_error_evt(uint8_t* p) {
    return;
  }

  send_bta_sys_hw_event(BTA_SYS_ERROR_EVT);
  BTA_sys_signal_hw_error();
}

/*******************************************************************************