From c5ca292eb635751336859d79d758df4cb71c0713 Mon Sep 17 00:00:00 2001 From: Ravi kumar Veeramally Date: Tue, 5 Nov 2013 00:20:06 +0200 Subject: [PATCH] android/hid: Retrieve BOOT_DEVICE attribute from SDP and cache it It will be usefull to handle when application level requests get or set protocol from hid device. --- android/hid.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/hid.c b/android/hid.c index 2498d2def..c0c9aeba6 100644 --- a/android/hid.c +++ b/android/hid.c @@ -69,6 +69,7 @@ struct hid_device { uint8_t country; int rd_size; void *rd_data; + uint8_t boot_dev; GIOChannel *ctrl_io; GIOChannel *intr_io; guint ctrl_watch; @@ -446,6 +447,10 @@ static void hid_sdp_search_cb(sdp_list_t *recs, int err, gpointer data) if (data) dev->subclass = data->val.uint8; + data = sdp_data_get(rec, SDP_ATTR_HID_BOOT_DEVICE); + if (data) + dev->boot_dev = data->val.uint8; + data = sdp_data_get(rec, SDP_ATTR_HID_DESCRIPTOR_LIST); if (data) { if (!SDP_IS_SEQ(data->dtd)) -- 2.47.3