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

Commit 8e20dc5f authored by Zach Johnson's avatar Zach Johnson
Browse files

Inline BTA_DisableBluetooth

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I51a69fcb02e0f3c17b92ee579cdb4a3118405ef9
parent 911ceb26
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -50,21 +50,6 @@ void BTA_dm_init() {
  bta_sys_eir_register(bta_dm_eir_update_uuid);
}

/*******************************************************************************
 *
 * Function         BTA_DisableBluetooth
 *
 * Description      Disables bluetooth service.  This function is called when
 *                  the application no longer needs bluetooth service
 *
 * Returns          void
 *
 ******************************************************************************/
tBTA_STATUS BTA_DisableBluetooth(void) {
  do_in_main_thread(FROM_HERE, base::Bind(bta_dm_disable));
  return BTA_SUCCESS;
}

/** Enables bluetooth device under test mode */
void BTA_EnableTestMode(void) {
  do_in_main_thread(FROM_HERE,
+0 −13
Original line number Diff line number Diff line
@@ -950,19 +950,6 @@ typedef uint8_t tBTA_DM_LINK_TYPE;
 ****************************************************************************/

void BTA_dm_init();
/*******************************************************************************
 *
 * Function         BTA_DisableBluetooth
 *
 * Description      This function disables BTA and the Bluetooth protocol
 *                  stack.  It is called when BTA is no longer being used
 *                  by any application in the system.
 *
 *
 * Returns          void
 *
 ******************************************************************************/
extern tBTA_STATUS BTA_DisableBluetooth(void);

/*******************************************************************************
 *
+2 −1
Original line number Diff line number Diff line
@@ -271,7 +271,8 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {
  btif_dm_on_disable();
  btif_sock_cleanup();
  btif_pan_cleanup();
  BTA_DisableBluetooth();

  do_in_main_thread(FROM_HERE, base::Bind(bta_dm_disable));

  module_shut_down(get_module(BTIF_CONFIG_MODULE));