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

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

Merge "gd: Fix issue of device that not support BLE privacy"

parents 35ede9f5 38a15cdd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -54,10 +54,11 @@ void LeAddressManager::SetPrivacyPolicyForInitiatorAddress(
  ASSERT(address_policy != AddressPolicy::POLICY_NOT_SET);
  ASSERT_LOG(registered_clients_.empty(), "Policy must be set before clients are registered.");
  address_policy_ = address_policy;
  LOG_INFO("SetPrivacyPolicyForInitiatorAddress with policy %d", address_policy);

  switch (address_policy_) {
    case AddressPolicy::USE_PUBLIC_ADDRESS:
      le_address_ = fixed_address;
      le_address_ = AddressWithType(public_address_, AddressType::PUBLIC_DEVICE_ADDRESS);
      handler_->BindOnceOn(this, &LeAddressManager::resume_registered_clients).Invoke();
      break;
    case AddressPolicy::USE_STATIC_ADDRESS: {
+7 −3
Original line number Diff line number Diff line
@@ -296,11 +296,15 @@ FORWARD_GETTER_IF_RUST(
    GetController()->GetControllerIsoBufferSize().total_num_le_packets_)
FORWARD_GETTER_IF_RUST(uint8_t, get_le_connect_list_size,
                       GetController()->GetLeConnectListSize())
FORWARD_GETTER_IF_RUST(uint8_t, get_le_resolving_list_size,
                       GetController()->GetLeResolvingListSize())

static uint8_t ble_resolving_list_max_size = 0;

static void set_ble_resolving_list_max_size(int resolving_list_max_size) {
  LOG_WARN("%s TODO Unimplemented", __func__);
  ble_resolving_list_max_size = resolving_list_max_size;
}

static uint8_t get_le_resolving_list_size(void) {
  return ble_resolving_list_max_size;
}

static uint8_t get_le_all_initiating_phys() { return data_.phy; }