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

Commit 074cf7ab authored by Zach Johnson's avatar Zach Johnson
Browse files

btm_acl_update_busy_level is now only about inquriy state

always report status, clean up function

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib1d806d6ba048f57340de97b60f96a0240264032
parent a66af2aa
Loading
Loading
Loading
Loading
+5 −16
Original line number Diff line number Diff line
@@ -450,7 +450,6 @@ void btm_acl_set_paging(bool value) { btm_cb.is_paging = value; }
 *
 ******************************************************************************/
void btm_acl_update_busy_level(tBTM_BLI_EVENT event) {
  bool old_inquiry_state = btm_cb.is_inquiry;
  tBTM_BL_UPDATE_DATA evt;
  evt.busy_level_flags = 0;
  switch (event) {
@@ -471,23 +470,13 @@ void btm_acl_update_busy_level(tBTM_BLI_EVENT event) {
      break;
  }

  uint8_t busy_level;
  if (btm_cb.is_paging || btm_cb.is_inquiry)
    busy_level = 10;
  else
    busy_level = BTM_GetNumAclLinks();

  if ((busy_level != btm_cb.busy_level) ||
      (old_inquiry_state != btm_cb.is_inquiry)) {
  evt.event = BTM_BL_UPDATE_EVT;
    btm_cb.busy_level = busy_level;
  if (btm_cb.acl_cb_.p_bl_changed_cb) {
    tBTM_BL_EVENT_DATA btm_bl_event_data;
    btm_bl_event_data.update = evt;
    (*btm_cb.acl_cb_.p_bl_changed_cb)(&btm_bl_event_data);
  }
}
}

/*******************************************************************************
 *
+0 −1
Original line number Diff line number Diff line
@@ -703,7 +703,6 @@ typedef struct {
  RawAddress connecting_bda;
  DEV_CLASS connecting_dc;
  uint8_t trace_level;
  uint8_t busy_level; /* the current busy level */
  bool is_paging;     /* true, if paging is in progess */
  bool is_inquiry;    /* true, if inquiry is in progess */
  fixed_queue_t* page_queue;