Loading android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +4 −8 Original line number Original line Diff line number Diff line Loading @@ -20,8 +20,6 @@ #include "utils/Log.h" #include "utils/Log.h" #include "utils/misc.h" #include "utils/misc.h" #include <base/logging.h> #include <base/strings/stringprintf.h> #include <cutils/properties.h> #include <cutils/properties.h> #include <dlfcn.h> #include <dlfcn.h> #include <errno.h> #include <errno.h> Loading Loading @@ -613,22 +611,20 @@ int hal_util_load_bt_library(const bt_interface_t** interface) { void* handle = dlopen(path, RTLD_NOW); void* handle = dlopen(path, RTLD_NOW); if (!handle) { if (!handle) { const char* err_str = dlerror(); const char* err_str = dlerror(); LOG(ERROR) << __func__ << ": failed to load Bluetooth library, error=" ALOGE("%s: failed to load Bluetooth library, error=%s", __func__, << (err_str ? err_str : "error unknown"); err_str ? err_str : "error unknown"); goto error; goto error; } } // Get the address of the bt_interface_t. // Get the address of the bt_interface_t. itf = (bt_interface_t*)dlsym(handle, sym); itf = (bt_interface_t*)dlsym(handle, sym); if (!itf) { if (!itf) { LOG(ERROR) << __func__ << ": failed to load symbol from Bluetooth library " ALOGE("%s: failed to load symbol from Bluetooth library %s", __func__, sym); << sym; goto error; goto error; } } // Success. // Success. LOG(INFO) << __func__ << " loaded HAL: btinterface=" << itf ALOGI("%s: loaded Bluetooth library successfully", __func__); << ", handle=" << handle; *interface = itf; *interface = itf; return 0; return 0; Loading Loading
android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +4 −8 Original line number Original line Diff line number Diff line Loading @@ -20,8 +20,6 @@ #include "utils/Log.h" #include "utils/Log.h" #include "utils/misc.h" #include "utils/misc.h" #include <base/logging.h> #include <base/strings/stringprintf.h> #include <cutils/properties.h> #include <cutils/properties.h> #include <dlfcn.h> #include <dlfcn.h> #include <errno.h> #include <errno.h> Loading Loading @@ -613,22 +611,20 @@ int hal_util_load_bt_library(const bt_interface_t** interface) { void* handle = dlopen(path, RTLD_NOW); void* handle = dlopen(path, RTLD_NOW); if (!handle) { if (!handle) { const char* err_str = dlerror(); const char* err_str = dlerror(); LOG(ERROR) << __func__ << ": failed to load Bluetooth library, error=" ALOGE("%s: failed to load Bluetooth library, error=%s", __func__, << (err_str ? err_str : "error unknown"); err_str ? err_str : "error unknown"); goto error; goto error; } } // Get the address of the bt_interface_t. // Get the address of the bt_interface_t. itf = (bt_interface_t*)dlsym(handle, sym); itf = (bt_interface_t*)dlsym(handle, sym); if (!itf) { if (!itf) { LOG(ERROR) << __func__ << ": failed to load symbol from Bluetooth library " ALOGE("%s: failed to load symbol from Bluetooth library %s", __func__, sym); << sym; goto error; goto error; } } // Success. // Success. LOG(INFO) << __func__ << " loaded HAL: btinterface=" << itf ALOGI("%s: loaded Bluetooth library successfully", __func__); << ", handle=" << handle; *interface = itf; *interface = itf; return 0; return 0; Loading