summaryrefslogtreecommitdiff
path: root/android/hal-handsfree.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-11-06 10:32:04 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-11-06 12:31:31 +0100
commitf87676bc4540c783acfdb5fefe2d8d877b422c4f (patch)
treead0a3f20026de9a78e6793b55ea4993e54c272ec /android/hal-handsfree.c
parent7abcd024882301eb02ff4808edd68e1039d7e589 (diff)
downloadbluez-f87676bc4540c783acfdb5fefe2d8d877b422c4f.tar.gz
android/handsfree: Add support for new API for cnum_cmd_cb
CNUM 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.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
index e4ade61f2..8618ddf89 100644
--- a/android/hal-handsfree.c
+++ b/android/hal-handsfree.c
@@ -167,8 +167,15 @@ static void handle_chld(void *buf, uint16_t len, int fd)
static void handle_cnum(void *buf, uint16_t len, int fd)
{
- if (cbs->cnum_cmd_cb)
- cbs->cnum_cmd_cb();
+ if (cbs->cnum_cmd_cb) {
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+ struct hal_ev_handsfree_cnum *ev = buf;
+
+ cbs->cnum_cmd_cb((bt_bdaddr_t *) (ev->bdaddr));
+#else
+ cbs->cnum_cmd_cb(NULL);
+#endif
+ }
}
static void handle_cind(void *buf, uint16_t len, int fd)