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

Commit 8783bb7b authored by Zach Johnson's avatar Zach Johnson Committed by Automerger Merge Worker
Browse files

btm_acl_update_busy_level is now only about inquriy state am: 074cf7ab am: c7a2c9c7

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1393892

Change-Id: Ic8b399284900b8ba13a2c80abd7ca361a4832c40
parents 72433f67 c7a2c9c7
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;