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

Commit 1fe3a5f5 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Gerrit Code Review
Browse files

Merge "floss: Add sysprop for LeGetVendorCapabilities"

parents 85f5798c fe233305
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -25,12 +25,18 @@
#include "hci/hci_layer.h"
#include "hci_controller_generated.h"
#include "os/metrics.h"
#include "os/system_properties.h"
#include "sysprops/sysprops_module.h"

namespace bluetooth {
namespace hci {

constexpr uint8_t kMinEncryptionKeySize = 7;  // #define MIN_ENCRYPTION_KEY_SIZE 7

constexpr bool kDefaultVendorCapabilitiesEnabled = true;
static const std::string kPropertyVendorCapabilitiesEnabled =
    "bluetooth.core.le.vendor_capabilities.enabled";

using os::Handler;

struct Controller::impl {
@@ -172,8 +178,15 @@ struct Controller::impl {
          handler->BindOnceOn(this, &Controller::impl::le_set_host_feature_handler));
    }

    hci_->EnqueueCommand(LeGetVendorCapabilitiesBuilder::Create(),
    // Skip vendor capabilities check if configured.
    if (os::GetSystemPropertyBool(
            kPropertyVendorCapabilitiesEnabled, kDefaultVendorCapabilitiesEnabled)) {
      hci_->EnqueueCommand(
          LeGetVendorCapabilitiesBuilder::Create(),
          handler->BindOnceOn(this, &Controller::impl::le_get_vendor_capabilities_handler));
    } else {
      vendor_capabilities_.is_supported_ = 0x00;
    }

    // We only need to synchronize the last read. Make BD_ADDR to be the last one.
    std::promise<void> promise;
@@ -1238,6 +1251,7 @@ const ModuleFactory Controller::Factory = ModuleFactory([]() { return new Contro

void Controller::ListDependencies(ModuleList* list) const {
  list->add<hci::HciLayer>();
  list->add<sysprops::SyspropsModule>();
}

void Controller::Start() {
+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ void SyspropsModule::parse_config(std::string file_path) {
      "bluetooth.core.le.connection_scan_window_slow",
      "bluetooth.core.le.inquiry_scan_interval",
      "bluetooth.core.le.inquiry_scan_window",
      "bluetooth.core.le.vendor_capabilities.enabled",
      // SCO
      "bluetooth.sco.disable_enhanced_connection",
      // Profile