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

Commit 35fd7ecc authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Andre Eisenbach
Browse files

Get rid of libhardware dependency in native daemon

Test: compilation test
Bug: 66187274
Change-Id: I97ee33a55315f44dc03083d1a8da9a38d5619725
parent f792de8b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

struct hw_module_t;

// Loads the Bluetooth library. If OS_GENERIC is defined, this function looks
// explicitly for libbluetooth.default.so and loads it. On Android, this calls
// the hw_get_module routine with the Bluetooth stack module id.
// Loads the Bluetooth library. This function looks explicitly for
// libbluetooth.default.so and loads it.
int hal_util_load_bt_library(const struct hw_module_t** module);
+1 −13
Original line number Diff line number Diff line
@@ -26,8 +26,6 @@
#include "btcore/include/hal_util.h"
#include "osi/include/log.h"

#if defined(OS_GENERIC)

// TODO(armansito): All logging macros should include __func__ by default (see
// Bug: 22671731)
#define HULOGERR(fmt, args...)                                          \
@@ -38,7 +36,7 @@
// generic manner as opposed to hard-coding it here.
static const char kBluetoothLibraryName[] = "libbluetooth.default.so";

static int load_bt_library(const struct hw_module_t** module) {
int hal_util_load_bt_library(const struct hw_module_t** module) {
  const char* id = BT_STACK_MODULE_ID;
  const char* sym = HAL_MODULE_INFO_SYM_AS_STR;
  struct hw_module_t* hmi = nullptr;
@@ -79,13 +77,3 @@ error:

  return -EINVAL;
}

#endif  // defined(OS_GENERIC)

int hal_util_load_bt_library(const struct hw_module_t** module) {
#if defined(OS_GENERIC)
  return load_bt_library(module);
#else  // !defined(OS_GENERIC)
  return hw_get_module(BT_STACK_MODULE_ID, module);
#endif  // defined(OS_GENERIC)
}
+2 −1
Original line number Diff line number Diff line
@@ -76,10 +76,11 @@ cc_binary {
        "libbluetooth-binder-common",
        "libbtcore",
    ],

    header_libs: [ "libhardware_headers" ],
    shared_libs: [
        "libbinder",
        "libcutils",
        "libhardware",
        "liblog",
        "libutils",
    ],
+1 −2
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ cc_test {
    header_libs: ["libhardware_headers"],
    shared_libs: [
        "liblog",
        "libhardware",
        "libcutils",
    ],
    static_libs: [
@@ -37,9 +36,9 @@ cc_test {
        "rfcomm/rfcomm_test.cc",
        "rfcomm/rfcomm_unittest.cc",
    ],
    header_libs: [ "libhardware_headers" ],
    shared_libs: [
        "liblog",
        "libhardware",
        "libcutils",
    ],
    static_libs: [