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

Commit 909b52f7 authored by Matt Swartwout's avatar Matt Swartwout Committed by Chris Manton
Browse files

Apply auto-formatting to btm_ble_gap.cc

Bug: 194907365
Test: Compiles
Tag: #refactor

Change-Id: If06ed34f76e0366171f11407e061471348284b30
parent f1ffeeb5
Loading
Loading
Loading
Loading
+15 −18
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#include <base/bind.h>
#include <base/strings/string_number_conversions.h>

#include <cstdint>
#include <list>
#include <memory>
@@ -128,9 +129,7 @@ class AdvertisingCache {
    }
  }

  void ClearAll() {
    items.clear();
  }
  void ClearAll() { items.clear(); }

 private:
  struct Item {
@@ -544,7 +543,6 @@ static void btm_get_dynamic_audio_buffer_vsc_cmpl_cback(
 ******************************************************************************/
static void btm_ble_vendor_capability_vsc_cmpl_cback(
    tBTM_VSC_CMPL* p_vcs_cplt_params) {

  BTM_TRACE_DEBUG("%s", __func__);

  /* Check status of command complete event */
@@ -578,7 +576,8 @@ static void btm_ble_vendor_capability_vsc_cmpl_cback(

  if (btm_cb.cmn_ble_vsc_cb.version_supported >=
      BTM_VSC_CHIP_CAPABILITY_M_VERSION) {
    CHECK(p_vcs_cplt_params->param_len >= BTM_VSC_CHIP_CAPABILITY_RSP_LEN_M_RELEASE);
    CHECK(p_vcs_cplt_params->param_len >=
          BTM_VSC_CHIP_CAPABILITY_RSP_LEN_M_RELEASE);
    STREAM_TO_UINT16(btm_cb.cmn_ble_vsc_cb.total_trackable_advertisers, p);
    STREAM_TO_UINT8(btm_cb.cmn_ble_vsc_cb.extended_scan_support, p);
    STREAM_TO_UINT8(btm_cb.cmn_ble_vsc_cb.debug_logging_supported, p);
@@ -1858,11 +1857,11 @@ void btm_ble_process_adv_pkt(uint8_t data_len, uint8_t* data) {
    uint16_t event_type;
    event_type = 1 << BLE_EVT_LEGACY_BIT;
    if (legacy_evt_type == BTM_BLE_ADV_IND_EVT) {
      event_type |= (1 << BLE_EVT_CONNECTABLE_BIT)|
                    (1 << BLE_EVT_SCANNABLE_BIT);
      event_type |=
          (1 << BLE_EVT_CONNECTABLE_BIT) | (1 << BLE_EVT_SCANNABLE_BIT);
    } else if (legacy_evt_type == BTM_BLE_ADV_DIRECT_IND_EVT) {
      event_type |= (1 << BLE_EVT_CONNECTABLE_BIT)|
                    (1 << BLE_EVT_DIRECTED_BIT);
      event_type |=
          (1 << BLE_EVT_CONNECTABLE_BIT) | (1 << BLE_EVT_DIRECTED_BIT);
    } else if (legacy_evt_type == BTM_BLE_ADV_SCAN_IND_EVT) {
      event_type |= (1 << BLE_EVT_SCANNABLE_BIT);
    } else if (legacy_evt_type == BTM_BLE_ADV_NONCONN_IND_EVT) {
@@ -1913,13 +1912,11 @@ void btm_ble_process_adv_pkt_cont(uint16_t evt_type, uint8_t addr_type,
  // has no ad flag, the device will be set to DUMO mode. The createbond
  // procedure will use the wrong device mode.
  // In such case no necessary to report scan response
  if(is_legacy && is_scan_resp && !cache.Exist(addr_type, bda))
    return;
  if (is_legacy && is_scan_resp && !cache.Exist(addr_type, bda)) return;

  bool is_start = is_legacy && is_scannable && !is_scan_resp;

  if (is_legacy)
    AdvertiseDataParser::RemoveTrailingZeros(tmp);
  if (is_legacy) AdvertiseDataParser::RemoveTrailingZeros(tmp);

  // We might have send scan request to this device before, but didn't get the
  // response. In such case make sure data is put at start, not appended to