summaryrefslogtreecommitdiff
path: root/android/hal-handsfree.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-11-06 10:32:05 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-11-06 12:31:32 +0100
commit9ad873ef43ceaddde1fb2779e974d131e0732d1a (patch)
treee0f7bcc0413656fd6cf1755dba2a76bc54026e65 /android/hal-handsfree.c
parentf87676bc4540c783acfdb5fefe2d8d877b422c4f (diff)
downloadbluez-9ad873ef43ceaddde1fb2779e974d131e0732d1a.tar.gz
android/handsfree: Add support for new API for cind_cmd_cb
CIND Command notification callback has new parameter bdaddr. Currently use global device bdaddr.
Diffstat (limited to 'android/hal-handsfree.c')
-rw-r--r--android/hal-handsfree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
index 8618ddf89..1ea8a9c2d 100644
--- a/android/hal-handsfree.c
+++ b/android/hal-handsfree.c
@@ -180,8 +180,15 @@ static void handle_cnum(void *buf, uint16_t len, int fd)
static void handle_cind(void *buf, uint16_t len, int fd)
{
- if (cbs->cind_cmd_cb)
+ if (cbs->cind_cmd_cb) {
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+ struct hal_ev_handsfree_cind *ev = buf;
+
+ cbs->cind_cmd_cb((bt_bdaddr_t *) (ev->bdaddr));
+#else
cbs->cind_cmd_cb();
+#endif
+ }
}
static void handle_cops(void *buf, uint16_t len, int fd)