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

Commit 628bb94e authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Tell the controller to allow all devices BTIF API

Bug: 232814383
Test: ./build.py
Test: mma -j $(nproc)
Tag: #floss
Change-Id: Ib2ebbd527e553323b058e21e4b9f4a057ec91847
parent 8f5c3109
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,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_event_filter_connection_setup_all_devices();
void btif_dm_allow_wake_by_hid();
void btif_dm_restore_filter_accept_list();
void btif_dm_set_default_event_mask();
+9 −0
Original line number Diff line number Diff line
@@ -491,6 +491,14 @@ static int allow_wake_by_hid() {
  return BT_STATUS_SUCCESS;
}

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

static void dump(int fd, const char** arguments) {
  btif_debug_conn_dump(fd);
  btif_debug_bond_event_dump(fd);
@@ -750,6 +758,7 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = {
    clear_filter_accept_list,
    disconnect_all_acls,
    le_rand,
    set_event_filter_connection_setup_all_devices,
    allow_wake_by_hid,
    restore_filter_accept_list,
    set_default_event_mask,
+5 −0
Original line number Diff line number Diff line
@@ -3403,6 +3403,11 @@ void btif_dm_le_rand(LeRandCallback callback) {
  bta_dm_le_rand(callback);
}

void btif_dm_set_event_filter_connection_setup_all_devices() {
  // Autoplumbed
  BTA_DmSetEventFilterConnectionSetupAllDevices();
}

void btif_dm_allow_wake_by_hid() {
  // Autoplumbed
  BTA_DmAllowWakeByHid();
+4 −0
Original line number Diff line number Diff line
@@ -1116,6 +1116,10 @@ impl BluetoothInterface {
        ccall!(self, set_event_filter_inquiry_result_all_devices)
    }

    pub fn set_event_filter_connection_setup_all_devices(&self) -> i32 {
        ccall!(self, set_event_filter_connection_setup_all_devices)
    }

    pub(crate) fn get_profile_interface(
        &self,
        profile: SupportedProfiles,
+7 −0
Original line number Diff line number Diff line
@@ -839,6 +839,13 @@ typedef struct {
   *
   */
  int (*allow_wake_by_hid)();

  /**
   *
   * Tell the controller to allow all devices
   *
   */
  int (*set_event_filter_connection_setup_all_devices)();
} bt_interface_t;

#define BLUETOOTH_INTERFACE_STRING "bluetoothInterface"
Loading