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

Commit 44436eac authored by Erwin Jansen's avatar Erwin Jansen Committed by Automerger Merge Worker
Browse files

Enable missing HCI cmds in rootcanal am: 5f2fc457

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1692659

Change-Id: I306349ec2b6d0f627bd5f0ed951ecc62b0fa54b6
parents 1ff53306 5f2fc457
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -289,6 +289,8 @@ DualModeController::DualModeController(const std::string& properties_filename, u
  SET_SUPPORTED(READ_VOICE_SETTING, ReadVoiceSetting);
  SET_SUPPORTED(READ_CONNECTION_ACCEPT_TIMEOUT, ReadConnectionAcceptTimeout);
  SET_SUPPORTED(WRITE_CONNECTION_ACCEPT_TIMEOUT, WriteConnectionAcceptTimeout);
  SET_SUPPORTED(LE_SET_ADDRESS_RESOLUTION_ENABLE, LeSetAddressResolutionEnable);
  SET_SUPPORTED(LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT, LeSetResovalablePrivateAddressTimeout);
#undef SET_HANDLER
#undef SET_SUPPORTED
  properties_.SetSupportedCommands(supported_commands);
@@ -1570,6 +1572,24 @@ void DualModeController::LeReadBufferSize(CommandView command) {
  send_event_(std::move(packet));
}

void DualModeController::LeSetAddressResolutionEnable(CommandView command) {
    // NOP
    auto payload =
      std::make_unique<bluetooth::packet::RawBuilder>(std::vector<uint8_t>(
          {static_cast<uint8_t>(bluetooth::hci::ErrorCode::SUCCESS)}));
  send_event_(bluetooth::hci::CommandCompleteBuilder::Create(
      kNumCommandPackets, command.GetOpCode(), std::move(payload)));
}

void DualModeController::LeSetResovalablePrivateAddressTimeout(CommandView command) {
    // NOP
    auto payload =
      std::make_unique<bluetooth::packet::RawBuilder>(std::vector<uint8_t>(
          {static_cast<uint8_t>(bluetooth::hci::ErrorCode::SUCCESS)}));
  send_event_(bluetooth::hci::CommandCompleteBuilder::Create(
      kNumCommandPackets, command.GetOpCode(), std::move(payload)));
}

void DualModeController::LeReadLocalSupportedFeatures(CommandView command) {
  auto command_view = gd_hci::LeReadLocalSupportedFeaturesView::Create(command);
  ASSERT(command_view.IsValid());
+6 −0
Original line number Diff line number Diff line
@@ -478,6 +478,12 @@ class DualModeController : public Device {
  // 7.8.41
  void LeReadResolvingListSize(CommandView args);

  // 7.8.44
  void LeSetAddressResolutionEnable(CommandView args);

  // 7.8.45
  void LeSetResovalablePrivateAddressTimeout(CommandView args);

  // 7.8.46
  void LeReadMaximumDataLength(CommandView args);