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

Commit 14aefaa9 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge changes I60d7d279,Iafd3237d,Ifb06d326,I515f5099 into main

* changes:
  InitFlags: Remove att_mtu_default
  InitFlags: Remove use_rsi_from_cached_inquiry_results
  InitFlags: Remove sdp_return_classic_services_when_le_discovery_fails
  InitFlags: Remove subrating_is_enabled
parents b269d286 0991c226
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include "bta_le_audio_uuids.h"
#include "bta_sec_api.h"
#include "btif/include/btif_storage.h"
#include "common/init_flags.h"
#include "crypto_toolbox/crypto_toolbox.h"
#include "csis_types.h"
#include "gap_api.h"
@@ -1430,10 +1429,6 @@ private:
  }

  void CsisActiveDiscovery(std::shared_ptr<CsisGroup> csis_group) {
    if (bluetooth::common::InitFlags::UseRsiFromCachedInquiryResults()) {
      CheckForGroupInInqDb(csis_group);
    }

    if (csis_group->GetDiscoveryState() != CsisDiscoveryState::CSIS_DISCOVERY_IDLE) {
      log::error("Incorrect ase group: {}, state 0x{:02x}", csis_group->GetGroupId(),
                 static_cast<int>(csis_group->GetDiscoveryState()));
+2 −12
Original line number Diff line number Diff line
@@ -1781,21 +1781,11 @@ void btif_on_gatt_results(RawAddress bd_addr, BD_NAME bd_name,
      return;
    }

    if (lea_supported) {
      if (bluetooth::common::init_flags::
                  sdp_return_classic_services_when_le_discovery_fails_is_enabled()) {
        log::info("Will return Classic SDP results, if done, to unblock bonding");
      } else {
        // LEA device w/o this flag
        // TODO: we might want to remove bond or do some action on
        // half-discovered device
        log::warn("No GATT service found for the LE Audio device {}", bd_addr);
        return;
      }
    } else {
    if (!lea_supported) {
      log::info("LE audio not supported, no need to report any UUIDs");
      return;
    }
    log::info("Will return Classic SDP results, if done, to unblock bonding");
  }

  Uuid existing_uuids[BT_MAX_NUM_UUIDS] = {};
+0 −6
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

#pragma once

#include <string>

#include "src/init_flags.rs.h"

namespace bluetooth {
@@ -34,10 +32,6 @@ public:
    init_flags::load(std::move(rusted_flags));
  }

  inline static bool UseRsiFromCachedInquiryResults() {
    return init_flags::use_rsi_from_cached_inqiry_results_is_enabled();
  }

  inline static int GetAdapterIndex() { return init_flags::get_hci_adapter(); }

  inline static void SetAllForTesting() { init_flags::set_all_for_testing(); }
+1 −11
Original line number Diff line number Diff line
@@ -16,14 +16,4 @@
 *
 ******************************************************************************/

#include "common/init_flags.h"

#include <gtest/gtest.h>
 No newline at end of file

using bluetooth::common::InitFlags;

TEST(InitFlagsTest, test_enable_use_rsi_from_cached_inqiry_results) {
  const char* input[] = {"INIT_use_rsi_from_cached_inqiry_results=true", nullptr};
  InitFlags::Load(input);
  ASSERT_TRUE(InitFlags::UseRsiFromCachedInquiryResults());
}
+1 −5
Original line number Diff line number Diff line
@@ -212,8 +212,7 @@ struct Controller::impl {
              handler->BindOnceOn(this, &Controller::impl::le_set_host_feature_handler));
    }

    if (common::init_flags::subrating_is_enabled() && is_supported(OpCode::LE_SET_HOST_FEATURE) &&
        module_.SupportsBleConnectionSubrating()) {
    if (is_supported(OpCode::LE_SET_HOST_FEATURE) && module_.SupportsBleConnectionSubrating()) {
      hci_->EnqueueCommand(
              LeSetHostFeatureBuilder::Create(LeHostFeatureBits::CONNECTION_SUBRATING_HOST_SUPPORT,
                                              Enable::ENABLED),
@@ -1517,9 +1516,6 @@ bool Controller::IsSupported(bluetooth::hci::OpCode op_code) const {
}

uint64_t Controller::MaskLeEventMask(HciVersion version, uint64_t mask) {
  if (!common::init_flags::subrating_is_enabled()) {
    mask = mask & ~(static_cast<uint64_t>(LLFeaturesBits::CONNECTION_SUBRATING_HOST_SUPPORT));
  }
  if (version >= HciVersion::V_5_3) {
    return mask;
  } else if (version >= HciVersion::V_5_2) {
Loading