Diff between 3abafb415e2bf6ef4ce780e168c071ed0ec56c7f and 0473ce49b10a3625d83735fbe3c3aa38f2bbc7fd

Changed Files

File Additions Deletions Status
android/hal-handsfree.c +4 -0 modified
android/hal-ipc-api.txt +1 -0 modified
android/hal-msg.h +1 -0 modified
android/handsfree.c +2 -0 modified

Full Patch

diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
index dfa37e7..c465277 100644
--- a/android/hal-handsfree.c
+++ b/android/hal-handsfree.c
@@ -58,7 +58,11 @@ static void handle_vr_state(void *buf, uint16_t len, int fd)
 	struct hal_ev_handsfree_vr_state *ev = buf;
 
 	if (cbs->vr_cmd_cb)
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+		cbs->vr_cmd_cb(ev->state, (bt_bdaddr_t *) (ev->bdaddr));
+#else
 		cbs->vr_cmd_cb(ev->state);
+#endif
 }
 
 static void handle_answer(void *buf, uint16_t len, int fd)
diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 72677d2..c0e9a39 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1008,6 +1008,7 @@ Notifications:
 	Opcode 0x83 - Voice Recognition Command notification
 
 		Notification parameters: Voice recognition state (1 octet)
+		                         Remote address (6 octets)
 
 		Valid voice recognition states: 0x00 = Stopped
 		                                0x01 = Started
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 9b08966..4ea30da 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1346,6 +1346,7 @@ struct hal_ev_handsfree_audio_state {
 #define HAL_EV_HANDSFREE_VR		0x83
 struct hal_ev_handsfree_vr_state {
 	uint8_t state;
+	uint8_t bdaddr[6];
 } __attribute__((packed));
 
 #define HAL_EV_HANDSFREE_ANSWER		0x84
diff --git a/android/handsfree.c b/android/handsfree.c
index 2c325b1..d6579ba 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -822,6 +822,8 @@ static void at_cmd_bvra(struct hfp_context *context,
 		else
 			ev.state = HAL_HANDSFREE_VR_STOPPED;
 
+		bdaddr2android(&dev->bdaddr, ev.bdaddr);
+
 		ipc_send_notif(hal_ipc, HAL_SERVICE_ID_HANDSFREE,
 					HAL_EV_HANDSFREE_VR, sizeof(ev), &ev);
 		return;