// 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()) {
adv_data_ = advertise_data;
scan_response_ = scan_response;
- settings_ = settings;
+ advertise_settings_ = settings;
AdvertiseParams params;
GetAdvertiseParams(settings, !scan_response_.data().empty(), ¶ms);
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;
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.