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

Commit 7a800591 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Set the default event mask for Classic and LE BTIF API

Bug: 224602920
Test: mma -j $(nproc)
Test: ./build.py
Tag: #floss
Change-Id: Ibbdeb76ec6233f9037d9b16462b444de0a101b61
parent e6d1ee17
Loading
Loading
Loading
Loading
+1 −0
Original line number 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_le_rand(LeRandCallback callback);
void btif_dm_set_default_event_mask();
void btif_dm_set_event_filter_inquiry_result_all_devices();

/*callout for reading SMP properties from Text file*/
+7 −1
Original line number Diff line number Diff line
@@ -472,6 +472,12 @@ static int set_event_filter_inquiry_result_all_devices() {
  return BT_STATUS_SUCCESS;
}

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

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

// callback reporting helpers

+5 −0
Original line number Diff line number Diff line
@@ -3294,6 +3294,11 @@ void btif_dm_le_rand(LeRandCallback callback) {
  bta_dm_le_rand(callback);
}

void btif_dm_set_default_event_mask() {
  // Autoplumbed
  BTA_DmSetDefaultEventMask();
}

void btif_dm_set_event_filter_inquiry_result_all_devices() {
  // Autoplumbed
  BTA_DmSetEventFilterInquiryResultAllDevices();
+7 −0
Original line number Diff line number Diff line
@@ -811,6 +811,13 @@ typedef struct {
   *
   */
  int (*set_event_filter_inquiry_result_all_devices)();

  /**
   *
   * Floss: Set the default event mask for Classic and LE
   *
   */
  int (*set_default_event_mask)();
} bt_interface_t;

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

Loading