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

Commit a9854e4c authored by Joseph Hwang's avatar Joseph Hwang
Browse files

btif: expose get_wbs_supported method

This patch exposes the get_wbs_supported method so that floss
can query whether WBS is supported by the controller.

Bug: 244507283
Tag: #floss
Test: atest net_test_btif
Test: ./build.py --target test
Test: Manual test with next patch --
      "Floss: Add wbs support adapter API"

Change-Id: I5a6b5fbb0d6c5cd0d679983ab0cdaa2570b6b92f
parent a4af3246
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "osi/include/wakelock.h"
#include "stack/btm/btm_sco_hfp_hal.h"
#include "stack/gatt/connection_manager.h"
#include "stack/include/avdt_api.h"
#include "stack/include/btm_api.h"
@@ -242,6 +243,11 @@ static int disable(void) {
static void cleanup(void) { stack_manager_get_interface()->clean_up_stack(); }

bool is_restricted_mode() { return restricted_mode; }

static bool get_wbs_supported() {
  return hfp_hal_interface::get_wbs_supported();
}

bool is_common_criteria_mode() {
  return is_bluetooth_uid() && common_criteria_mode;
}
@@ -776,7 +782,8 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = {
    allow_wake_by_hid,
    restore_filter_accept_list,
    set_default_event_mask,
    set_event_filter_inquiry_result_all_devices};
    set_event_filter_inquiry_result_all_devices,
    get_wbs_supported};

// callback reporting helpers

+7 −0
Original line number Diff line number Diff line
@@ -869,6 +869,13 @@ typedef struct {
   *
   */
  int (*set_event_filter_connection_setup_all_devices)();

  /**
   *
   * Is wbs supported by the controller
   *
   */
  bool (*get_wbs_supported)();
} bt_interface_t;

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

}  // namespace