Diff between 6c411b18321ebebfddba5e12e4a8ea008a277a43 and 5b2756dd9b4f8252eb8d00dfc2f26be00cdbf870

Changed Files

File Additions Deletions Status
android/socket.c +13 -0 modified

Full Patch

diff --git a/android/socket.c b/android/socket.c
index 876439b..435d9b9 100644
--- a/android/socket.c
+++ b/android/socket.c
@@ -49,6 +49,7 @@
 
 #define SPP_DEFAULT_CHANNEL	3
 #define OPP_DEFAULT_CHANNEL	9
+#define HFAG_DEFAULT_CHANNEL	13
 #define PBAP_DEFAULT_CHANNEL	15
 #define MAS_DEFAULT_CHANNEL	16
 
@@ -375,6 +376,15 @@ static const struct profile_info {
 } profiles[] = {
 	{
 		.uuid = {
+			0x00, 0x00, 0x11, 0x1F, 0x00, 0x00, 0x10, 0x00,
+			0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB
+		},
+		.channel = HFAG_DEFAULT_CHANNEL,
+		.svc_hint = 0,
+		.sec_level = BT_IO_SEC_MEDIUM,
+		.create_record = NULL
+	}, {
+		.uuid = {
 			0x00, 0x00, 0x11, 0x2F, 0x00, 0x00, 0x10, 0x00,
 			0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB
 		},
@@ -742,6 +752,9 @@ static uint8_t rfcomm_listen(int chan, const uint8_t *name, const uint8_t *uuid,
 	if (!profile) {
 		sec_level = BT_IO_SEC_MEDIUM;
 	} else {
+		if (!profile->create_record)
+			return HAL_STATUS_INVALID;
+
 		chan = profile->channel;
 		sec_level = profile->sec_level;
 	}