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

Commit 46951d34 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Set the event filter to inquiry result device all BTIF API

Bug: 216486494
Test: mma -j $(nproc)
Test: ./build.py
Tag: #floss
Change-Id: I2c3b4b463ca4c1fd1939bca79493e720d567768d
parent db21e975
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -76,6 +76,7 @@ void btif_dm_clear_filter_accept_list();
void btif_dm_disconnect_all_acls();
void btif_dm_disconnect_all_acls();


void btif_dm_le_rand(LeRandCallback callback);
void btif_dm_le_rand(LeRandCallback callback);
void btif_dm_set_event_filter_inquiry_result_all_devices();


/*callout for reading SMP properties from Text file*/
/*callout for reading SMP properties from Text file*/
bool btif_dm_get_smp_config(tBTE_APPL_CFG* p_cfg);
bool btif_dm_get_smp_config(tBTE_APPL_CFG* p_cfg);
+10 −1
Original line number Original line Diff line number Diff line
@@ -464,6 +464,14 @@ static int le_rand() {
  return BT_STATUS_SUCCESS;
  return BT_STATUS_SUCCESS;
}
}


static int set_event_filter_inquiry_result_all_devices() {
  if (!interface_ready()) return BT_STATUS_NOT_READY;
  do_in_main_thread(
      FROM_HERE,
      base::BindOnce(btif_dm_set_event_filter_inquiry_result_all_devices));
  return BT_STATUS_SUCCESS;
}

static void dump(int fd, const char** arguments) {
static void dump(int fd, const char** arguments) {
  btif_debug_conn_dump(fd);
  btif_debug_conn_dump(fd);
  btif_debug_bond_event_dump(fd);
  btif_debug_bond_event_dump(fd);
@@ -722,7 +730,8 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = {
    clear_event_mask,
    clear_event_mask,
    clear_filter_accept_list,
    clear_filter_accept_list,
    disconnect_all_acls,
    disconnect_all_acls,
    le_rand};
    le_rand,
    set_event_filter_inquiry_result_all_devices};


// callback reporting helpers
// callback reporting helpers


+5 −0
Original line number Original line Diff line number Diff line
@@ -3293,3 +3293,8 @@ void btif_dm_le_rand(LeRandCallback callback) {
  LOG_VERBOSE("%s: called", __func__);
  LOG_VERBOSE("%s: called", __func__);
  bta_dm_le_rand(callback);
  bta_dm_le_rand(callback);
}
}

void btif_dm_set_event_filter_inquiry_result_all_devices() {
  // Autoplumbed
  BTA_DmSetEventFilterInquiryResultAllDevices();
}
+7 −0
Original line number Original line Diff line number Diff line
@@ -804,6 +804,13 @@ typedef struct {
   * Call to retrieve a generated random
   * Call to retrieve a generated random
   */
   */
  int (*le_rand)();
  int (*le_rand)();

  /**
   *
   * Floss: Set the event filter to inquiry result device all
   *
   */
  int (*set_event_filter_inquiry_result_all_devices)();
} bt_interface_t;
} bt_interface_t;


#define BLUETOOTH_INTERFACE_STRING "bluetoothInterface"
#define BLUETOOTH_INTERFACE_STRING "bluetoothInterface"
+1 −0
Original line number Original line Diff line number Diff line
@@ -86,6 +86,7 @@ bt_interface_t fake_bt_iface = {
    nullptr, /* clear_filter_accept_list */
    nullptr, /* clear_filter_accept_list */
    nullptr, /* disconnect_all_acls */
    nullptr, /* disconnect_all_acls */
    nullptr, /* le_rand */
    nullptr, /* le_rand */
    nullptr, /* set_event_filter_inquiry_result_all_devices */
};
};


}  // namespace
}  // namespace
Loading