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

Commit b1e46636 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: BTA API: BTA_DmClearEventFilter

Allow floss to clear event filter.

Bug: 217374249
Test: Compiles
Tag: #floss
Change-Id: I5f7afaeea5aa7b3d82693fca3d959d750f431e96
parent a15ddff9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -3996,6 +3996,20 @@ void bta_dm_proc_open_evt(tBTA_GATTC_OPEN* p_data) {
  }
}

/*******************************************************************************
 *
 * Function         bta_dm_proc_open_evt
 *
 * Description      process BTA_GATTC_OPEN_EVT in DM.
 *
 * Parameters:
 *
 ******************************************************************************/
void bta_dm_clear_event_filter(void) {
  VLOG(1) << "bta_dm_clear_event_filter in bta_dm_act";
  bluetooth::shim::BTM_ClearEventFilter();
}

/*******************************************************************************
 *
 * Function         bta_dm_gattc_callback
+14 −0
Original line number Diff line number Diff line
@@ -670,3 +670,17 @@ void BTA_DmBleCsisObserve(bool observe, tBTA_DM_SEARCH_CBACK* p_results_cb) {
 *
 ******************************************************************************/
void BTA_VendorInit(void) { APPL_TRACE_API("BTA_VendorInit"); }

/*******************************************************************************
 *
 * Function         BTA_DmClearEventFilter
 *
 * Description      This function clears the event filter
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmClearEventFilter(void) {
  APPL_TRACE_API("BTA_DmClearEventFilter");
  do_in_main_thread(FROM_HERE, base::Bind(bta_dm_clear_event_filter));
}
+2 −0
Original line number Diff line number Diff line
@@ -553,6 +553,8 @@ extern void bta_dm_disc_rmt_name(tBTA_DM_MSG* p_data);
extern tBTA_DM_PEER_DEVICE* bta_dm_find_peer_device(
    const RawAddress& peer_addr);

extern void bta_dm_clear_event_filter(void);

uint8_t bta_dm_search_get_state();
void bta_dm_search_set_state(uint8_t state);

+11 −0
Original line number Diff line number Diff line
@@ -1194,4 +1194,15 @@ extern void BTA_DmBleGetEnergyInfo(tBTA_BLE_ENERGY_INFO_CBACK* p_cmpl_cback);
 ******************************************************************************/
extern void BTA_VendorInit(void);

/*******************************************************************************
 *
 * Function         BTA_DmClearEventFilter
 *
 * Description      This function clears the event filter
 *
 * Returns          void
 *
 ******************************************************************************/
extern void BTA_DmClearEventFilter(void);

#endif /* BTA_API_H */
+9 −0
Original line number Diff line number Diff line
@@ -255,6 +255,15 @@ struct bta_dm_ble_observe {
};
extern struct bta_dm_ble_observe bta_dm_ble_observe;

// Name: bta_dm_clear_event_filter
// Params: None
// Return: void
struct bta_dm_clear_event_filter {
  std::function<void()> body{[]() {}};
  void operator()() { body(); };
};
extern struct bta_dm_clear_event_filter bta_dm_clear_event_filter;

// Name: bta_dm_ble_passkey_reply
// Params: const RawAddress& bd_addr, bool accept, uint32_t passkey
// Return: void