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

Commit 9efa098e authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Turn channel map for advertising into property am: e7fee400

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1931008

Change-Id: I989c23638558a255b4e417b238022945e6197774
parents d485a552 e7fee400
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "btif_common.h"
#include "main/shim/le_advertising_manager.h"
#include "main/shim/shim.h"
#include "osi/include/properties.h"
#include "stack/include/btu.h"

using base::Bind;
@@ -64,10 +65,14 @@ static inline OwnedArrayWrapper<T> OwnedArray(T* o) {

void parseParams(tBTM_BLE_ADV_PARAMS* p_params,
                 const AdvertiseParameters& params) {
  // By default use all channels, but have property for tweaking.
  int channel_map = osi_property_get_int32(
      "persist.bluetooth.advertising_channel_map", params.channel_map);

  p_params->advertising_event_properties = params.advertising_event_properties;
  p_params->adv_int_min = params.min_interval;
  p_params->adv_int_max = params.max_interval;
  p_params->channel_map = params.channel_map;
  p_params->channel_map = channel_map;
  p_params->adv_filter_policy = 0;
  p_params->tx_power = params.tx_power;
  p_params->primary_advertising_phy = params.primary_advertising_phy;