diff options
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) { |