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

Commit c1967dce authored by Zach Johnson's avatar Zach Johnson
Browse files

Standardize logging to ALOG[x] macros

Bug: 143971120
Test: compile, boot, and check things that invoke callbacks (like discovery) still work
Change-Id: Ib23b0d49c5a5861742f084076868bfe4dc84d45e
parent 66de1bd3
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@
#include "utils/Log.h"
#include "utils/misc.h"

#include <base/logging.h>
#include <base/strings/stringprintf.h>
#include <cutils/properties.h>
#include <dlfcn.h>
#include <errno.h>
@@ -613,22 +611,20 @@ int hal_util_load_bt_library(const bt_interface_t** interface) {
  void* handle = dlopen(path, RTLD_NOW);
  if (!handle) {
    const char* err_str = dlerror();
    LOG(ERROR) << __func__ << ": failed to load Bluetooth library, error="
               << (err_str ? err_str : "error unknown");
    ALOGE("%s: failed to load Bluetooth library, error=%s", __func__,
          err_str ? err_str : "error unknown");
    goto error;
  }

  // Get the address of the bt_interface_t.
  itf = (bt_interface_t*)dlsym(handle, sym);
  if (!itf) {
    LOG(ERROR) << __func__ << ": failed to load symbol from Bluetooth library "
               << sym;
    ALOGE("%s: failed to load symbol from Bluetooth library %s", __func__, sym);
    goto error;
  }

  // Success.
  LOG(INFO) << __func__ << " loaded HAL: btinterface=" << itf
            << ", handle=" << handle;
  ALOGI("%s: loaded Bluetooth library successfully", __func__);
  *interface = itf;
  return 0;