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

Commit e794c233 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

legacy: Replace stack::btm_devctl::make_set_event_mask am: 5e6fddc7 am: 38e99cd8 am: 83dffc1a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1859537

Change-Id: I319fde5955c861bc736417b81e40d2881fc5c052
parents d0ff02b9 83dffc1a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -401,3 +401,7 @@ const controller_t* bluetooth::shim::controller_get_interface() {
  }
  return &interface;
}

void bluetooth::shim::controller_clear_event_mask() {
  bluetooth::shim::GetController()->SetEventMask(0);
}
+2 −0
Original line number Diff line number Diff line
@@ -25,5 +25,7 @@ namespace shim {

const controller_t* controller_get_interface();

void controller_clear_event_mask();

}  // namespace shim
}  // namespace bluetooth
+2 −4
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include "hci/include/hci_packet_factory.h"
#include "main/shim/btm_api.h"
#include "main/shim/controller.h"
#include "main/shim/entry.h"
#include "main/shim/hci_layer.h"
#include "main/shim/shim.h"
#include "osi/include/compat.h"
@@ -663,10 +664,7 @@ tBTM_STATUS BTM_EnableTestMode(void) {
  }

  /* mask off all of event from controller */
  bluetooth::shim::hci_layer_get_interface()->transmit_command(
      hci_packet_factory_get_interface()->make_set_event_mask(
          (const bt_event_mask_t*)("\x00\x00\x00\x00\x00\x00\x00\x00")),
      NULL, NULL, NULL);
  bluetooth::shim::controller_clear_event_mask();

  /* Send the HCI command */
  btsnd_hcic_enable_test_mode();
+4 −0
Original line number Diff line number Diff line
@@ -35,3 +35,7 @@ const controller_t* bluetooth::shim::controller_get_interface() {
  mock_function_count_map[__func__]++;
  return nullptr;
}

void bluetooth::shim::controller_clear_event_mask() {
  mock_function_count_map[__func__]++;
}