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

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

Turn channel map for advertising into property am: e7fee400 am: 9efa098e am: 6c47241e

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

Change-Id: I0dc9149ced450f52932e1273f60fc912a4e89ad4
parents 797b2f66 6c47241e
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;