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

Commit e26de87a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Connect inquiry API query implementation"

parents e2d3398f 69b91342
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -230,6 +230,14 @@ void bluetooth::shim::Btm::CancelPeriodicInquiry() {
  bluetooth::shim::GetInquiry()->StopPeriodicInquiry();
}

bool bluetooth::shim::Btm::IsGeneralPeriodicInquiryActive() const {
  return bluetooth::shim::GetInquiry()->IsGeneralPeriodicInquiryActive();
}

bool bluetooth::shim::Btm::IsLimitedPeriodicInquiryActive() const {
  return bluetooth::shim::GetInquiry()->IsLimitedPeriodicInquiryActive();
}

/**
 * Discoverability
 */
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ class Btm {
                            uint16_t min_delay,
                            tBTM_INQ_RESULTS_CB* p_results_cb);
  void CancelPeriodicInquiry();
  bool IsGeneralPeriodicInquiryActive() const;
  bool IsLimitedPeriodicInquiryActive() const;

  void SetClassicGeneralDiscoverability(uint16_t window, uint16_t interval);
  void SetClassicLimitedDiscoverability(uint16_t window, uint16_t interval);
+8 −5
Original line number Diff line number Diff line
@@ -441,12 +441,15 @@ uint16_t bluetooth::shim::BTM_ReadConnectability(uint16_t* p_window,
 *
 ******************************************************************************/
uint16_t bluetooth::shim::BTM_IsInquiryActive(void) {
  LOG_INFO(LOG_TAG, "UNIMPLEMENTED %s", __func__);
  if (!shim_btm.IsInquiryActive()) {
    return BTM_INQUIRY_INACTIVE;
  }

  if (shim_btm.IsLimitedInquiryActive()) {
    return BTM_LIMITED_INQUIRY_ACTIVE;
  } else if (shim_btm.IsGeneralInquiryActive()) {
    return BTM_GENERAL_INQUIRY_ACTIVE;
  } else if (shim_btm.IsGeneralPeriodicInquiryActive() ||
             shim_btm.IsLimitedPeriodicInquiryActive()) {
    return BTM_PERIODIC_INQUIRY_ACTIVE;
  }
  return BTM_INQUIRY_INACTIVE;
}

/*******************************************************************************