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

Commit e6b09f6f authored by Zach Johnson's avatar Zach Johnson Committed by Gerrit Code Review
Browse files

Merge changes I660901a4,I73ef9a97,Iccfb31fe,If8adec40,Ie379258b, ...

* changes:
  Remove functions orphaned by the removal of BTM_VendorCleanup
  Remove unreachable BT(A|M)_VendorCleanup functions
  This call will never be successful
  Flatten bte_main_cleanup
  Move bte_main_cleanup call to stack_manager
  Rename bte_main_boot_entry, and pull out irrelevant module inits
parents cc24d92f 41ee91c5
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -718,15 +718,3 @@ extern void BTA_DmBleObserve(bool start, uint8_t duration,
 *
 ******************************************************************************/
void BTA_VendorInit(void) { APPL_TRACE_API("BTA_VendorInit"); }

/*******************************************************************************
 *
 * Function         BTA_VendorCleanup
 *
 * Description      This function frees up Broadcom specific VS specific dynamic
 *                  memory
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_VendorCleanup(void) { BTM_VendorCleanup(); }
+0 −12
Original line number Diff line number Diff line
@@ -1451,16 +1451,4 @@ extern void BTA_DmBleGetEnergyInfo(tBTA_BLE_ENERGY_INFO_CBACK* p_cmpl_cback);
 ******************************************************************************/
extern void BTA_VendorInit(void);

/*******************************************************************************
 *
 * Function         BTA_BrcmCleanup
 *
 * Description      This function frees up Broadcom specific VS specific dynamic
 *                  memory
 *
 * Returns          void
 *
 ******************************************************************************/
extern void BTA_VendorCleanup(void);

#endif /* BTA_API_H */
+1 −2
Original line number Diff line number Diff line
@@ -210,8 +210,7 @@ void btif_remote_properties_evt(bt_status_t status, RawAddress* remote_addr,
                                uint32_t num_props, bt_property_t* p_props);

void bte_load_did_conf(const char* p_path);
void bte_main_boot_entry(void);
void bte_main_cleanup(void);
void bte_main_init(void);

bt_status_t btif_transfer_context(tBTIF_CBACK* p_cback, uint16_t event,
                                  char* p_params, int param_len,
+0 −2
Original line number Diff line number Diff line
@@ -397,12 +397,10 @@ void btif_enable_bluetooth_evt() {

bt_status_t btif_cleanup_bluetooth() {
  LOG_INFO("%s entered", __func__);
  do_in_main_thread(FROM_HERE, base::Bind(&BTA_VendorCleanup));
  btif_dm_cleanup();
  jni_thread.DoInThread(FROM_HERE, base::BindOnce(btif_jni_disassociate));
  btif_queue_release();
  jni_thread.ShutDown();
  bte_main_cleanup();
  delete exit_manager;
  exit_manager = nullptr;
  btif_dut_mode = 0;
+10 −1
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@
#include "bta_dm_int.h"
#include "btif/include/btif_pan.h"
#include "btif/include/btif_sock.h"
#include "device/include/interop.h"
#include "internal_include/stack_config.h"
#include "main/shim/controller.h"

void main_thread_shut_down();
@@ -154,7 +156,10 @@ static void event_init_stack(void* context) {
    }
    module_init(get_module(BTIF_CONFIG_MODULE));
    btif_init_bluetooth();
    bte_main_boot_entry();

    module_init(get_module(INTEROP_MODULE));
    bte_main_init();
    module_init(get_module(STACK_CONFIG_MODULE));

    // stack init is synchronous, so no waiting necessary here
    stack_is_initialized = true;
@@ -336,6 +341,10 @@ static void event_clean_up_stack(void* context) {
  stack_is_initialized = false;

  btif_cleanup_bluetooth();

  module_clean_up(get_module(STACK_CONFIG_MODULE));
  module_clean_up(get_module(INTEROP_MODULE));

  module_clean_up(get_module(BTIF_CONFIG_MODULE));
  module_clean_up(get_module(BT_UTILS_MODULE));
  module_clean_up(get_module(OSI_MODULE));
Loading