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

Commit f52d3005 authored by Chris Manton's avatar Chris Manton
Browse files

Add support for le privacy

Bug: 142501664
Test: Verified multiple advertisers on nordic utility
Change-Id: Ied31dcb37d814a220247a5e972288d89627f1fb0
parent 8198497f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <base/callback.h>

#include "device/include/controller.h"
#include "main/shim/btm.h"
#include "main/shim/btm_api.h"
#include "osi/include/log.h"
@@ -714,3 +715,7 @@ void bluetooth::shim::BTM_BleEnableDisableFilterFeature(
uint8_t bluetooth::shim::BTM_BleMaxMultiAdvInstanceCount() {
  return shim_btm.GetNumberOfAdvertisingInstances();
}

bool bluetooth::shim::BTM_BleLocalPrivacyEnabled(void) {
  return controller_get_interface()->supports_ble_privacy();
}
+3 −0
Original line number Diff line number Diff line
@@ -711,6 +711,9 @@ extern uint8_t BTM_BleMaxMultiAdvInstanceCount(void) {
 ******************************************************************************/
bool BTM_BleLocalPrivacyEnabled(void) {
#if (BLE_PRIVACY_SPT == TRUE)
  if (bluetooth::shim::is_gd_shim_enabled()) {
    return bluetooth::shim::BTM_BleLocalPrivacyEnabled();
  }
  return (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE);
#else
  return false;