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

Commit 08eeffa2 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: BTIF API: ClearEventFilter

Expose ClearEventFilter to BTIF consumer

Bug: 216477258
Test: Compiles
Tag: #floss
Change-Id: Ib1314442b280f721ef92500bac8355d90af2ba31
parent b1e46636
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, Octet16* p_c,
void btif_dm_generate_local_oob_data(tBT_TRANSPORT transport);
#endif /* BTIF_DM_OOB_TEST */

void btif_dm_clear_event_filter();

/*callout for reading SMP properties from Text file*/
bool btif_dm_get_smp_config(tBTE_APPL_CFG* p_cfg);

+10 −1
Original line number Diff line number Diff line
@@ -412,6 +412,14 @@ static int read_energy_info() {
  return BT_STATUS_SUCCESS;
}

static int clear_event_filter() {
  LOG_VERBOSE("%s", __func__);
  if (!interface_ready()) return BT_STATUS_NOT_READY;

  do_in_main_thread(FROM_HERE, base::BindOnce(btif_dm_clear_event_filter));
  return BT_STATUS_SUCCESS;
}

static void dump(int fd, const char** arguments) {
  btif_debug_conn_dump(fd);
  btif_debug_bond_event_dump(fd);
@@ -662,7 +670,8 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = {
    get_metric_id,
    set_dynamic_audio_buffer_size,
    generate_local_oob_data,
    allow_low_latency_audio};
    allow_low_latency_audio,
    clear_event_filter};

// callback reporting helpers

+5 −0
Original line number Diff line number Diff line
@@ -3206,3 +3206,8 @@ bool btif_get_address_type(const RawAddress& bda, tBLE_ADDR_TYPE* p_addr_type) {
            AddressTypeText(*p_addr_type).c_str());
  return true;
}

void btif_dm_clear_event_filter() {
  LOG_VERBOSE("%s: called", __func__);
  bta_dm_clear_event_filter();
}
+5 −0
Original line number Diff line number Diff line
@@ -771,6 +771,11 @@ typedef struct {
   * @return true if audio low latency is successfully allowed or disallowed
   */
  bool (*allow_low_latency_audio)(bool allowed, const RawAddress& address);

  /**
   * Set the event filter for the controller
   */
  int (*clear_event_filter)();
} bt_interface_t;

#define BLUETOOTH_INTERFACE_STRING "bluetoothInterface"
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ bt_callbacks_t bt_callbacks = {
    nullptr, /* energy_info_cb */
    LinkQualityReportCallback,
    nullptr /* generate_local_oob_data_cb */,
    SwitchBufferSizeCallback
    SwitchBufferSizeCallback,
};

bt_os_callouts_t bt_os_callouts = {sizeof(bt_os_callouts_t),
Loading