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

Commit 98f2d808 authored by Chris Manton's avatar Chris Manton
Browse files

DO NOT MERGE Decouple inquiry result parsing

Bug: 146086425
Test: bluetooth_legacy_test
Change-Id: Ic87db900a3f9b56657c0d07b1ff2e416ac1a2fb6
parent 011f6a73
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -32,10 +32,6 @@ extern tBTM_CB btm_cb;
static constexpr size_t kMaxInquiryResultSize = 4096;
static uint8_t inquiry_result_buf[kMaxInquiryResultSize];

static constexpr uint8_t kInquiryResultMode = 0;
static constexpr uint8_t kInquiryResultWithRssiMode = 1;
static constexpr uint8_t kExtendedInquiryResultMode = 2;

static constexpr size_t kRemoteDeviceNameLength = 248;

static constexpr uint8_t kAdvDataInfoNotPresent = 0xff;
@@ -47,7 +43,6 @@ static constexpr bool kPassiveScanning = false;

extern void btm_process_cancel_complete(uint8_t status, uint8_t mode);
extern void btm_process_inq_complete(uint8_t status, uint8_t result_type);
extern void btm_process_inq_results(uint8_t* p, uint8_t result_mode);
extern void btm_ble_process_adv_addr(RawAddress& raw_address,
                                     uint8_t* address_type);
extern void btm_ble_process_adv_pkt_cont(
@@ -65,7 +60,6 @@ void bluetooth::shim::Btm::OnInquiryResult(std::vector<const uint8_t> result) {
  CHECK(result.size() < kMaxInquiryResultSize);

  std::copy(result.begin(), result.end(), inquiry_result_buf);
  btm_process_inq_results(inquiry_result_buf, kInquiryResultMode);
}

void bluetooth::shim::Btm::OnInquiryResultWithRssi(
@@ -73,7 +67,6 @@ void bluetooth::shim::Btm::OnInquiryResultWithRssi(
  CHECK(result.size() < kMaxInquiryResultSize);

  std::copy(result.begin(), result.end(), inquiry_result_buf);
  btm_process_inq_results(inquiry_result_buf, kInquiryResultWithRssiMode);
}

void bluetooth::shim::Btm::OnExtendedInquiryResult(
@@ -81,7 +74,6 @@ void bluetooth::shim::Btm::OnExtendedInquiryResult(
  CHECK(result.size() < kMaxInquiryResultSize);

  std::copy(result.begin(), result.end(), inquiry_result_buf);
  btm_process_inq_results(inquiry_result_buf, kExtendedInquiryResultMode);
}

void bluetooth::shim::Btm::OnInquiryComplete(uint16_t status) {