From 7e64c7a0d58513ae141091f8fa7857df900c2923 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 7 Mar 2014 16:00:19 +0100 Subject: [PATCH] android/hal-handsfree: Fix handling of dial notification Empty number means re-dial and should be passed as NULL. --- android/hal-handsfree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c index 5f484fe07..31793b066 100644 --- a/android/hal-handsfree.c +++ b/android/hal-handsfree.c @@ -91,8 +91,13 @@ static void handle_dial(void *buf, uint16_t len) exit(EXIT_FAILURE); } - if (cbs->dial_call_cmd_cb) + if (!cbs->dial_call_cmd_cb) + return; + + if (ev->number_len) cbs->dial_call_cmd_cb((char *) ev->number); + else + cbs->dial_call_cmd_cb(NULL); } static void handle_dtmf(void *buf, uint16_t len) -- 2.47.3