Diff between 8343735754c098f04c0d81ff4254013f5521956f and e753d1c5f4bc217d823a6a6e296676a067f7f5f7

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 +1 -0 modified

Full Patch

diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
index 21d4444..76a2e0f 100644
--- a/android/hal-handsfree.c
+++ b/android/hal-handsfree.c
@@ -146,7 +146,11 @@ static void handle_nrec(void *buf, uint16_t len, int fd)
 	struct hal_ev_handsfree_nrec *ev = buf;
 
 	if (cbs->nrec_cmd_cb)
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+		cbs->nrec_cmd_cb(ev->nrec, (bt_bdaddr_t *) (ev->bdaddr));
+#else
 		cbs->nrec_cmd_cb(ev->nrec);
+#endif
 }
 
 static void handle_chld(void *buf, uint16_t len, int fd)
diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index aa824f4..d8911b3 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1043,6 +1043,7 @@ Notifications:
 	Opcode 0x89 - NREC Command notification
 
 		Notification parameters: NREC types (1 octet)
+		                         Remote address (6 octets)
 
 		Valid NREC types: 0x00 = Stop
 		                  0x01 = Start
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 00e66e2..321f193 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1385,6 +1385,7 @@ struct hal_ev_handsfree_dtmf {
 #define HAL_EV_HANDSFREE_NREC		0x89
 struct hal_ev_handsfree_nrec {
 	uint8_t nrec;
+	uint8_t bdaddr[6];
 } __attribute__((packed));
 
 #define HAL_HANDSFREE_CHLD_TYPE_RELEASEHELD			0x00
diff --git a/android/handsfree.c b/android/handsfree.c
index d008117..5a65d27 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -871,6 +871,7 @@ static void at_cmd_nrec(struct hfp_context *context,
 			break;
 
 		ev.nrec = HAL_HANDSFREE_NREC_STOP;
+		bdaddr2android(&dev->bdaddr, ev.bdaddr);
 
 		ipc_send_notif(hal_ipc, HAL_SERVICE_ID_HANDSFREE,
 					HAL_EV_HANDSFREE_NREC, sizeof(ev), &ev);