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

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

Merge "gd: Fix issue of device that not support BLE privacy" am: a18be026 am: 6b81b2b9

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

Change-Id: Iab138a665a7e8c946ab646003d34f7b4a7851509
parents fb4864a1 6b81b2b9
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; }