summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-05-11 08:39:36 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-05-11 08:39:36 +0000
commit8dda7e673487c1b72743b3a633599c2586c78c34 (patch)
tree5d52e4485948e72160c9823301dc2ff6c3e5055b
parent86ea5d00e8343d00ea61fcc517ce9d16699bd922 (diff)
parente1dbc9a43dd6b6f70855da023087fa6efae251df (diff)
downloadlibhardware-8dda7e673487c1b72743b3a633599c2586c78c34.tar.gz
release-request-051da47e-713f-4e09-8f6c-698fb4d4e92e-for-git_oc-dr1-release-3997165 snap-temp-L04400000062809322
Change-Id: I6b6904fd589f1b926633a6da60755d192c3d81a3
-rw-r--r--Android.bp1
-rw-r--r--hardware.c4
-rw-r--r--include/hardware/bt_hh.h8
3 files changed, 11 insertions, 2 deletions
diff --git a/Android.bp b/Android.bp
index f6aacd20..9c5a9cce 100644
--- a/Android.bp
+++ b/Android.bp
@@ -23,6 +23,7 @@ cc_library_shared {
"libcutils",
"liblog",
"libdl",
+ "libvndksupport",
],
cflags: ["-DQEMU_HARDWARE"],
diff --git a/hardware.c b/hardware.c
index 7e4debec..37b61c44 100644
--- a/hardware.c
+++ b/hardware.c
@@ -29,6 +29,8 @@
#define LOG_TAG "HAL"
#include <log/log.h>
+#include <vndksupport/linker.h>
+
/** Base path of the hal modules */
#if defined(__LP64__)
#define HAL_LIBRARY_PATH1 "/system/lib64/hw"
@@ -80,7 +82,7 @@ static int load(const char *id,
* dlopen returns. Since RTLD_GLOBAL is not or'd in with
* RTLD_NOW the external symbols will not be global
*/
- handle = dlopen(path, RTLD_NOW);
+ handle = android_load_sphal_library(path, RTLD_NOW);
if (handle == NULL) {
char const *err_str = dlerror();
ALOGE("load: module=%s\n%s", path, err_str?err_str:"unknown");
diff --git a/include/hardware/bt_hh.h b/include/hardware/bt_hh.h
index dad95868..ece3c114 100644
--- a/include/hardware/bt_hh.h
+++ b/include/hardware/bt_hh.h
@@ -165,6 +165,12 @@ typedef struct {
/** Set the HID proto mode. */
bt_status_t (*set_protocol)(bt_bdaddr_t *bd_addr, bthh_protocol_mode_t protocolMode);
+ /** Get the HID Idle Time */
+ bt_status_t (*get_idle_time)(bt_bdaddr_t *bd_addr);
+
+ /** Set the HID Idle Time */
+ bt_status_t (*set_idle_time)(bt_bdaddr_t *bd_addr, uint8_t idleTime);
+
/** Send a GET_REPORT to HID device. */
bt_status_t (*get_report)(bt_bdaddr_t *bd_addr, bthh_report_type_t reportType, uint8_t reportId, int bufferSize);
@@ -174,7 +180,7 @@ typedef struct {
/** Send data to HID device. */
bt_status_t (*send_data)(bt_bdaddr_t *bd_addr, char* data);
- /** Closes the interface. */
+ /** Closes the interface. */
void (*cleanup)( void );
} bthh_interface_t;