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

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

Merge changes I19bc0daf,I9e93cf4e

* changes:
  Pull bte_main_boot_entry out of btif_init_bluetooth
  Flatten btu_free_core and remove btu_init.cc
parents 3a59c4d4 6c51b479
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -322,7 +322,6 @@ void btif_sendmsg(void* p_msg) {
bt_status_t btif_init_bluetooth() {
  LOG_INFO("%s entered", __func__);
  exit_manager = new base::AtExitManager();
  bte_main_boot_entry();
  jni_thread.StartUp();
  jni_thread.DoInThread(FROM_HERE, base::Bind(btif_jni_associate));
  LOG_INFO("%s finished", __func__);
+5 −1
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ static void event_init_stack(void* context) {
    }
    module_init(get_module(BTIF_CONFIG_MODULE));
    btif_init_bluetooth();
    bte_main_boot_entry();

    // stack init is synchronous, so no waiting necessary here
    stack_is_initialized = true;
@@ -299,7 +300,10 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {

  module_clean_up(get_module(BTE_LOGMSG_MODULE));

  btu_free_core();
  gatt_free();
  l2c_free();
  sdp_free();
  btm_free();

  module_shut_down(get_module(CONTROLLER_MODULE));  // Doesn't do any work, just
                                                    // puts it in a restartable
+0 −1
Original line number Diff line number Diff line
@@ -111,7 +111,6 @@ cc_library_static {
        "btm/btm_sco.cc",
        "btm/btm_sec.cc",
        "btu/btu_hcif.cc",
        "btu/btu_init.cc",
        "btu/btu_task.cc",
        "gap/gap_ble.cc",
        "gap/gap_conn.cc",
+0 −1
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ static_library("stack") {
    "btm/btm_sco.cc",
    "btm/btm_sec.cc",
    "btu/btu_hcif.cc",
    "btu/btu_init.cc",
    "btu/btu_task.cc",
    "gap/gap_ble.cc",
    "gap/gap_conn.cc",

system/stack/btu/btu_init.cc

deleted100644 → 0
+0 −51
Original line number Diff line number Diff line
/******************************************************************************
 *
 *  Copyright 2000-2012 Broadcom Corporation
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 ******************************************************************************/

#define LOG_TAG "bt_task"

#include <base/logging.h>

#include "bt_target.h"
#include "btm_int.h"
#include "btu.h"
#include "common/message_loop_thread.h"
#include "device/include/controller.h"
#include "gatt_api.h"
#include "l2c_api.h"
#include "sdpint.h"

/*****************************************************************************
 *
 * Function         btu_free_core
 *
 * Description      Releases control block memory for each core component.
 *
 *
 * Returns          void
 *
 *****************************************************************************/
void btu_free_core() {
  /* Free the mandatory core stack components */
  gatt_free();

  l2c_free();

  sdp_free();

  btm_free();
}
Loading