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

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

Remove dynamic legacy module lookup aka STATIC_LIBBLUETOOTH

Bug: 204251482
Tag: #refactor
Test: gd/cert/run
BYPASS_INCLUSIVE_LANGUAGE_REASON=Legacy code

Change-Id: I1e2f661032485dd165be5b413904d376b428f344
parent bb599866
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -125,13 +125,6 @@ config("target_defaults") {
    "BTIF_HF_FEATURES=0x00000000"
  ]

  # If not configured as a dynamic library, default to static library
  if (!(defined(use.bt_dynlib) && use.bt_dynlib)) {
    defines += [
      "STATIC_LIBBLUETOOTH",
    ]
  }

  if (!(defined(use.bt_nonstandard_codecs) && use.bt_nonstandard_codecs)) {
    defines += [ "EXCLUDE_NONSTANDARD_CODECS" ]
  }
+0 −1
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ cc_library_static {
cc_library_static {
    name: "libbtcore-static",
    defaults: ["libbtcore_defaults"],
    cflags: ["-DSTATIC_LIBBLUETOOTH"],
}

cc_library_headers {
+0 −1
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ cc_library_static {
cc_library_static {
    name: "libbtif-static",
    defaults: ["libbtif_defaults"],
    cflags: ["-DSTATIC_LIBBLUETOOTH"],
}

// btif unit tests for target
+0 −8
Original line number Diff line number Diff line
@@ -21,10 +21,8 @@
#include "btif/include/stack_manager.h"

#include <hardware/bluetooth.h>
#if defined(STATIC_LIBBLUETOOTH)
#include <cstdlib>
#include <cstring>
#endif

#include "btcore/include/module.h"
#include "btcore/include/osi_module.h"
@@ -194,7 +192,6 @@ static bool get_stack_is_running() { return stack_is_running; }

// Internal functions

#ifdef STATIC_LIBBLUETOOTH
extern const module_t bt_utils_module;
extern const module_t bte_logmsg_module;
extern const module_t btif_config_module;
@@ -238,11 +235,6 @@ inline const module_t* get_local_module(const char* name) {
  LOG_ALWAYS_FATAL("Cannot find module %s, aborting", name);
  return nullptr;
}
#else
inline const module_t* get_local_module(const char* name) {
  return get_module(name);
}
#endif

// Synchronous function to initialize the stack
static void event_init_stack(void* context) {