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

Commit b74279fa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Inti enabled_sets_ after get advertising_api_type_" into tm-qpr-dev

parents 32b6c7a7 2c751d90
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -114,10 +114,6 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
    le_advertising_interface_ =
        hci_layer_->GetLeAdvertisingInterface(module_handler_->BindOn(this, &LeAdvertisingManager::impl::handle_event));
    num_instances_ = controller_->GetLeNumberOfSupportedAdverisingSets();
    enabled_sets_ = std::vector<EnabledSet>(num_instances_);
    for (size_t i = 0; i < enabled_sets_.size(); i++) {
      enabled_sets_[i].advertising_handle_ = kInvalidHandle;
    }

    if (controller_->SupportsBleExtendedAdvertising()) {
      advertising_api_type_ = AdvertisingApiType::EXTENDED;
@@ -138,6 +134,10 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
            handler->BindOnceOn(this, &impl::on_read_advertising_physical_channel_tx_power));
      }
    }
    enabled_sets_ = std::vector<EnabledSet>(num_instances_);
    for (size_t i = 0; i < enabled_sets_.size(); i++) {
      enabled_sets_[i].advertising_handle_ = kInvalidHandle;
    }
  }

  size_t GetNumberOfAdvertisingInstances() const {