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

Commit 49a7bc37 authored by Zach Johnson's avatar Zach Johnson
Browse files

Remove busy level from reported events

It's not actually used.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifdfb8613ebbbf7b748eec59f9164e368dd3f0feb
parent 3349affd
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -2652,13 +2652,11 @@ static void bta_dm_local_name_cback(UNUSED_ATTR void* p_name) {
    bta_dm_cb.p_sec_cback(BTA_DM_ENABLE_EVT, &sec_event);
}

static void send_busy_level_update(uint8_t busy_level,
                                   uint8_t busy_level_flags) {
static void send_busy_level_update(uint8_t busy_level_flags) {
  if (!bta_dm_cb.p_sec_cback) return;

  tBTA_DM_SEC conn;
  memset(&conn, 0, sizeof(tBTA_DM_SEC));
  conn.busy_level.level = busy_level;
  conn.busy_level.level_flags = busy_level_flags;
  bta_dm_cb.p_sec_cback(BTA_DM_BUSY_LEVEL_EVT, &conn);
}
@@ -2859,7 +2857,6 @@ static void bta_dm_bl_change_cback(tBTM_BL_EVENT_DATA* p_data) {
    case BTM_BL_UPDATE_EVT: {
      /* busy level update */
      do_in_main_thread(FROM_HERE, base::Bind(send_busy_level_update,
                                              p_data->update.busy_level,
                                              p_data->update.busy_level_flags));
      return;
    }
+0 −1
Original line number Diff line number Diff line
@@ -496,7 +496,6 @@ void btm_acl_update_busy_level(tBTM_BLI_EVENT event) {
  if ((busy_level != btm_cb.busy_level) ||
      (old_inquiry_state != btm_cb.is_inquiry)) {
    evt.event = BTM_BL_UPDATE_EVT;
    evt.busy_level = busy_level;
    btm_cb.busy_level = busy_level;
    if (btm_cb.acl_cb_.p_bl_changed_cb) {
      tBTM_BL_EVENT_DATA btm_bl_event_data;
+0 −2
Original line number Diff line number Diff line
@@ -172,8 +172,6 @@ typedef struct {
/* the data type associated with BTM_BL_UPDATE_EVT */
typedef struct {
  tBTM_BL_EVENT event;      /* The event reported. */
  uint8_t busy_level;       /* when paging or inquiring, level is 10.
                             * Otherwise, the number of ACL links. */
  uint8_t busy_level_flags; /* Notifies actual inquiry/page activities */
} tBTM_BL_UPDATE_DATA;