summaryrefslogtreecommitdiff
path: root/android/hal-bluetooth.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2013-12-20 11:25:38 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2013-12-20 12:57:24 +0200
commit9690e662ce688d5a3ca98bc369662bd23f6feb3e (patch)
treeabe3a6068a9de082c79d8da92c3170870f910fd3 /android/hal-bluetooth.c
parent88e025c8627283e5beceb0e070fea460aa16c493 (diff)
downloadbluez-9690e662ce688d5a3ca98bc369662bd23f6feb3e.tar.gz
android/hal-bluetooth: Add support for remote version info property
This allows to correctly handle remote version info property. Although this property is marked as get/set in HAL only get is implemented as I fail to see how this property could be settable.
Diffstat (limited to 'android/hal-bluetooth.c')
-rw-r--r--android/hal-bluetooth.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 905b29304..d0c1c0136 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -145,8 +145,27 @@ static void device_props_to_hal(bt_property_t *send_props,
enum_prop_to_hal(send_props[i], prop,
bt_device_type_t);
break;
- case HAL_PROP_DEVICE_SERVICE_REC:
+#if PLATFORM_SDK_VERSION > 17
case HAL_PROP_DEVICE_VERSION_INFO:
+ {
+ static bt_remote_version_t e;
+ const struct hal_prop_device_info *p;
+ uint16_t tmp;
+
+ send_props[i].val = &e;
+ send_props[i].len = sizeof(e);
+
+ p = (struct hal_prop_device_info *) prop->val;
+
+ memcpy(&tmp, &p->manufacturer, sizeof(tmp));
+ e.manufacturer = tmp;
+ memcpy(&tmp, &p->sub_version, sizeof(tmp));
+ e.sub_ver = tmp;
+ e.version = p->version;
+ }
+ break;
+#endif
+ case HAL_PROP_DEVICE_SERVICE_REC:
default:
send_props[i].len = prop->len;
send_props[i].val = prop->val;