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

Commit df216972 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "RootCanal: Secure Connections controller support" am: e3e1672a am:...

Merge "RootCanal: Secure Connections controller support" am: e3e1672a am: 7106a476 am: 5cf8b006 am: 7cb9437b

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2183586



Change-Id: I8b5610bcd8a2c7f9398ec2d62372cd9de3724092
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f3e95f0d 7cb9437b
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ using ::bluetooth::hci::EventCode;
using ::bluetooth::hci::LLFeaturesBits;
using ::bluetooth::hci::LMPFeaturesPage0Bits;
using ::bluetooth::hci::LMPFeaturesPage1Bits;
using ::bluetooth::hci::LMPFeaturesPage2Bits;

static constexpr uint64_t Page0LmpFeatures() {
  LMPFeaturesPage0Bits features[] = {
@@ -103,6 +104,17 @@ static constexpr uint64_t Page1LmpFeatures() {
  return value;
}

static constexpr uint64_t Page2LmpFeatures() {
  LMPFeaturesPage2Bits features[] = {
      LMPFeaturesPage2Bits::SECURE_CONNECTIONS_CONTROLLER_SUPPORT,
  };

  uint64_t value = 0;
  for (unsigned i = 0; i < sizeof(features) / sizeof(*features); i++)
    value |= static_cast<uint64_t>(features[i]);
  return value;
}

static constexpr uint64_t LlFeatures() {
  LLFeaturesBits features[] = {
      LLFeaturesBits::LE_ENCRYPTION,
@@ -452,8 +464,8 @@ class DeviceProperties {
  std::vector<uint8_t> supported_codecs_;
  std::vector<uint32_t> vendor_specific_codecs_;
  std::array<uint8_t, 64> supported_commands_;
  std::array<uint64_t, 2> extended_features_{
      {Page0LmpFeatures(), Page1LmpFeatures()}};
  std::array<uint64_t, 3> extended_features_{
      {Page0LmpFeatures(), Page1LmpFeatures(), Page2LmpFeatures()}};
  ClassOfDevice class_of_device_{{0, 0, 0}};
  std::vector<uint8_t> extended_inquiry_data_;
  std::array<uint8_t, 248> name_{};