diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-12-08 17:47:07 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-12-10 14:31:55 +0100 |
commit | aae8b515c5b769a99bfabad01b922f33399a761a (patch) | |
tree | 23c623f4cf4070df99114de96f43646a86e2252d /android/hal-bluetooth.c | |
parent | 5fb15cc547dd89e6cb1244e69004105a4c1c820c (diff) | |
download | bluez-aae8b515c5b769a99bfabad01b922f33399a761a.tar.gz |
android/socket: Add support for dynamic MAP record
Android 5.0 uses service name (sic!) for defining instance ID and
supported message types. Name passed is in format of "XXYYname"
where XX is hex coded instance and YY is hex coded message types
mask.
This patch adds new mode for Socket HAL in which daemon tries to
extract instance ID and message types from service name.
Diffstat (limited to 'android/hal-bluetooth.c')
-rw-r--r-- | android/hal-bluetooth.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index 28289d306..e24f7d2af 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -554,9 +554,14 @@ static int init(bt_callbacks_t *callbacks) } cmd.service_id = HAL_SERVICE_ID_SOCKET; - cmd.mode = HAL_MODE_DEFAULT; cmd.max_clients = 1; +#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0) + cmd.mode = HAL_MODE_SOCKET_DYNAMIC_MAP; +#else + cmd.mode = HAL_MODE_DEFAULT; +#endif + status = hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_REGISTER_MODULE, sizeof(cmd), &cmd, NULL, NULL, NULL); if (status != BT_STATUS_SUCCESS) { |