summaryrefslogtreecommitdiffstats
path: root/btif/src/btif_dm.c
diff options
context:
space:
mode:
authorHemant Gupta <hemantg@codeaurora.org>2013-11-11 12:33:44 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:21:27 -0600
commit94c15ec1dc9776b16c2e9d684610818959fcf541 (patch)
tree73ae22ddb7647874791e1a2b5298cda1a833890f /btif/src/btif_dm.c
parente17afaa16705fafb5bcdd4c48da31599baf77464 (diff)
downloadandroid_system_bt-94c15ec1dc9776b16c2e9d684610818959fcf541.tar.gz
android_system_bt-94c15ec1dc9776b16c2e9d684610818959fcf541.tar.bz2
android_system_bt-94c15ec1dc9776b16c2e9d684610818959fcf541.zip
Bluetooth: Add support for HID Device Role (2/4)
This patch adds support for HID Device role in bluedroid stack allowing DUT to be used as Keyboard or Mouse. Change-Id: I45b581a54f6c7bbc1f25226715a7ea23e34255c0 CRs-Fixed: 573086
Diffstat (limited to 'btif/src/btif_dm.c')
-rw-r--r--btif/src/btif_dm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index dcee73683..1823116f5 100644
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -1,5 +1,7 @@
/******************************************************************************
*
+ * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
* Copyright (C) 2009-2012 Broadcom Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -47,6 +49,7 @@
#include "btif_dm.h"
#include "btif_storage.h"
#include "btif_hh.h"
+#include "btif_hd.h"
#include "btif_config.h"
#include "btif_sdp.h"
#include "bta_gatt_api.h"
@@ -219,6 +222,7 @@ extern bt_status_t btif_hh_execute_service(BOOLEAN b_enable);
extern bt_status_t btif_hf_client_execute_service(BOOLEAN b_enable);
extern bt_status_t btif_sdp_execute_service(BOOLEAN b_enable);
extern int btif_hh_connect(bt_bdaddr_t *bd_addr);
+extern bt_status_t btif_hd_execute_service(BOOLEAN b_enable);
extern void bta_gatt_convert_uuid16_to_uuid128(UINT8 uuid_128[LEN_UUID_128], UINT16 uuid_16);
@@ -284,6 +288,10 @@ bt_status_t btif_in_execute_service_request(tBTA_SERVICE_ID service_id,
{
btif_sdp_execute_service(b_enable);
}break;
+ case BTA_HIDD_SERVICE_ID:
+ {
+ btif_hd_execute_service(b_enable);
+ }break;
default:
BTIF_TRACE_ERROR("%s: Unknown service being enabled", __FUNCTION__);
return BT_STATUS_FAIL;
@@ -1732,6 +1740,12 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param)
#if (defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE))
btif_hh_remove_device(bd_addr);
#endif
+ #if (defined(BTA_HD_INCLUDED) && (BTA_HD_INCLUDED == TRUE))
+ btif_hd_remove_device(bd_addr);
+ #endif
+ #if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
+ btif_storage_remove_ble_bonding_keys(&bd_addr);
+ #endif
btif_storage_remove_bonded_device(&bd_addr);
bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_NONE);
break;