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

Commit ceba67e1 authored by Zach Johnson's avatar Zach Johnson
Browse files

BTM_ReadConnectability is never used now

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1f6a908f0730b38b310992c5dc2b12d6397ee4f2
parent dd35866d
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -486,17 +486,6 @@ tBTM_STATUS bluetooth::shim::BTM_SetConnectability(uint16_t page_mode,
  return BTM_SUCCESS;
}

uint16_t bluetooth::shim::BTM_ReadConnectability(uint16_t* p_window,
                                                 uint16_t* p_interval) {
  ConnectabilityState state =
      Stack::GetInstance()->GetBtm()->GetClassicConnectabilityState();

  if (p_window) *p_window = state.window;
  if (p_interval) *p_interval = state.interval;

  return state.mode;
}

uint16_t bluetooth::shim::BTM_IsInquiryActive(void) {
  if (Stack::GetInstance()->GetBtm()->IsGeneralInquiryActive()) {
    return BTM_GENERAL_INQUIRY_ACTIVE;
+0 −14
Original line number Diff line number Diff line
@@ -135,20 +135,6 @@ tBTM_STATUS BTM_SetInquiryMode(uint8_t mode);
tBTM_STATUS BTM_SetConnectability(uint16_t page_mode, uint16_t window,
                                  uint16_t interval);

/*******************************************************************************
 *
 * Function         BTM_ReadConnectability
 *
 * Description      This function is called to read the current discoverability
 *                  mode of the device.
 * Output Params    p_window - current page scan duration
 *                  p_interval - current time between page scans
 *
 * Returns          BTM_NON_CONNECTABLE or BTM_CONNECTABLE
 *
 ******************************************************************************/
uint16_t BTM_ReadConnectability(uint16_t* p_window, uint16_t* p_interval);

/*******************************************************************************
 *
 * Function         BTM_IsInquiryActive
+0 −25
Original line number Diff line number Diff line
@@ -374,31 +374,6 @@ tBTM_STATUS BTM_SetConnectability(uint16_t page_mode) {
  return (BTM_SUCCESS);
}

/*******************************************************************************
 *
 * Function         BTM_ReadConnectability
 *
 * Description      This function is called to read the current discoverability
 *                  mode of the device.
 * Output Params    p_window - current page scan duration
 *                  p_interval - current time between page scans
 *
 * Returns          BTM_NON_CONNECTABLE or BTM_CONNECTABLE
 *
 ******************************************************************************/
uint16_t BTM_ReadConnectability(uint16_t* p_window, uint16_t* p_interval) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
    return bluetooth::shim::BTM_ReadConnectability(p_window, p_interval);
  }

  BTM_TRACE_API("BTM_ReadConnectability");
  if (p_window) *p_window = btm_cb.btm_inq_vars.page_scan_window;

  if (p_interval) *p_interval = btm_cb.btm_inq_vars.page_scan_period;

  return (btm_cb.btm_inq_vars.connectable_mode);
}

/*******************************************************************************
 *
 * Function         BTM_IsInquiryActive
+0 −14
Original line number Diff line number Diff line
@@ -325,20 +325,6 @@ void BTM_CancelInquiry(void);
 ******************************************************************************/
tBTM_STATUS BTM_SetConnectability(uint16_t page_mode);

/*******************************************************************************
 *
 * Function         BTM_ReadConnectability
 *
 * Description      This function is called to read the current discoverability
 *                  mode of the device.
 * Output Params    p_window - current page scan duration
 *                  p_interval - current time between page scans
 *
 * Returns          BTM_NON_CONNECTABLE or BTM_CONNECTABLE
 *
 ******************************************************************************/
uint16_t BTM_ReadConnectability(uint16_t* p_window, uint16_t* p_interval);

/*******************************************************************************
 *
 * Function         BTM_SetInquiryMode