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

Commit 2c0605ca authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "service: Rename variable holding advertisement settings"

parents b8a3163a 14f5ffdf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ bool BluetoothLowEnergyBinderServer::StopMultiAdvertising(int client_id) {
  // Create a weak pointer and pass that to the callback to prevent a potential
  // use after free.
  android::wp<BluetoothLowEnergyBinderServer> weak_ptr_to_this(this);
  auto settings_copy = client->settings();
  auto settings_copy = client->advertise_settings();
  auto callback = [=](bluetooth::BLEStatus status) {
    auto sp_to_this = weak_ptr_to_this.promote();
    if (!sp_to_this.get()) {
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ bool LowEnergyClient::StartAdvertising(const AdvertiseSettings& settings,

  adv_data_ = advertise_data;
  scan_response_ = scan_response;
  settings_ = settings;
  advertise_settings_ = settings;

  AdvertiseParams params;
  GetAdvertiseParams(settings, !scan_response_.data().empty(), &params);
+4 −2
Original line number Diff line number Diff line
@@ -65,7 +65,9 @@ class LowEnergyClient : private hal::BluetoothGattInterface::ClientObserver,
  bool IsStoppingAdvertising() const;

  // Returns the current advertising settings.
  const AdvertiseSettings& settings() const { return settings_; }
  const AdvertiseSettings& advertise_settings() const {
   return advertise_settings_;
  }

  // BluetoothClientInstace overrides:
  const UUID& GetAppIdentifier() const override;
@@ -119,7 +121,7 @@ class LowEnergyClient : private hal::BluetoothGattInterface::ClientObserver,
  std::atomic_bool scan_rsp_needs_update_;

  // Latest advertising settings.
  AdvertiseSettings settings_;
  AdvertiseSettings advertise_settings_;

  // Whether or not there is a pending call to update advertising or scan
  // response data.