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

Commit 3e8659f9 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

stack::btm::BTM_BleSetScanParams: Remove unused function am: 0aa694ab am:...

stack::btm::BTM_BleSetScanParams: Remove unused function am: 0aa694ab am: f7940f69 am: 294c77f5

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2869602



Change-Id: Ic2d6cfd494870ffbee372208039999353626f203
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0776112f 294c77f5
Loading
Loading
Loading
Loading
+0 −38
Original line number Diff line number Diff line
@@ -1672,44 +1672,6 @@ static uint8_t btm_set_conn_mode_adv_init_addr(
  return evt_type;
}

/**
 * This function is called to set scan parameters. |cb| is called with operation
 * status
 **/
void BTM_BleSetScanParams(uint32_t scan_interval, uint32_t scan_window,
                          tBLE_SCAN_MODE scan_mode,
                          base::Callback<void(uint8_t)> cb) {
  if (!controller_get_interface()->supports_ble()) {
    LOG_INFO("Controller does not support ble");
    return;
  }

  uint32_t max_scan_interval = BTM_BLE_EXT_SCAN_INT_MAX;
  uint32_t max_scan_window = BTM_BLE_EXT_SCAN_WIN_MAX;
  if (btm_cb.cmn_ble_vsc_cb.extended_scan_support == 0) {
    max_scan_interval = BTM_BLE_SCAN_INT_MAX;
    max_scan_window = BTM_BLE_SCAN_WIN_MAX;
  }

  tBTM_BLE_INQ_CB* p_cb = &btm_cb.ble_ctr_cb.inq_var;
  if (BTM_BLE_ISVALID_PARAM(scan_interval, BTM_BLE_SCAN_INT_MIN,
                            max_scan_interval) &&
      BTM_BLE_ISVALID_PARAM(scan_window, BTM_BLE_SCAN_WIN_MIN,
                            max_scan_window) &&
      (scan_mode == BTM_BLE_SCAN_MODE_ACTI ||
       scan_mode == BTM_BLE_SCAN_MODE_PASS)) {
    p_cb->scan_type = scan_mode;
    p_cb->scan_interval = scan_interval;
    p_cb->scan_window = scan_window;

    cb.Run(BTM_SUCCESS);
  } else {
    cb.Run(BTM_ILLEGAL_VALUE);
    LOG_WARN("Illegal params: scan_interval = %d scan_window = %d",
             scan_interval, scan_window);
  }
}

/*******************************************************************************
 *
 * Function         BTM__BLEReadDiscoverability
+0 −8
Original line number Diff line number Diff line
@@ -44,14 +44,6 @@ void btm_ble_free();
 *  EXTERNAL FUNCTION DECLARATIONS
 ****************************************************************************/

/**
 * This function is called to set scan parameters. |cb| is called with operation
 * status
 **/
void BTM_BleSetScanParams(uint32_t scan_interval, uint32_t scan_window,
                          tBLE_SCAN_MODE scan_type,
                          base::Callback<void(uint8_t)> cb);

/*******************************************************************************
 *
 * Function         BTM_BleGetVendorCapabilities