OSDN Git Service

BTM_ReadConnectability is never used now
authorZach Johnson <zachoverflow@google.com>
Wed, 19 Aug 2020 18:53:25 +0000 (11:53 -0700)
committerZach Johnson <zachoverflow@google.com>
Wed, 19 Aug 2020 18:53:25 +0000 (11:53 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1f6a908f0730b38b310992c5dc2b12d6397ee4f2

main/shim/btm_api.cc
main/shim/btm_api.h
stack/btm/btm_inq.cc
stack/include/btm_api.h

index 39c413c..809388a 100644 (file)
@@ -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;
index 0ad78af..50b7519 100644 (file)
@@ -137,20 +137,6 @@ tBTM_STATUS BTM_SetConnectability(uint16_t page_mode, uint16_t window,
 
 /*******************************************************************************
  *
- * 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
  *
  * Description      Return a bit mask of the current inquiry state
index c25319b..384149a 100644 (file)
@@ -376,31 +376,6 @@ 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) {
-  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
  *
  * Description      This function returns a bit mask of the current inquiry
index 444f92d..3f4491e 100644 (file)
@@ -327,20 +327,6 @@ 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
  *
  * Description      This function is called to set standard, with RSSI