diff --git a/android/bluetooth.c b/android/bluetooth.c
index e534fc1..2e75864 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
uint32_t class;
int32_t rssi;
+ uint32_t timestamp;
+
GSList *uuids;
};
else
g_key_file_remove_key(key_file, addr, "Class", NULL);
+ g_key_file_set_integer(key_file, addr, "Timestamp", dev->timestamp);
+
if (dev->uuids) {
GSList *l;
int i;
bacpy(&dev->bdaddr, bdaddr);
dev->bdaddr_type = type;
dev->bond_state = HAL_BOND_STATE_NONE;
+ dev->timestamp = time(NULL);
/* use address for name, will be change if one is present
* eg. in EIR or set by set_property. */
ev->status = HAL_STATUS_SUCCESS;
bdaddr2android(bdaddr, ev->bdaddr);
+
+ dev->timestamp = time(NULL);
}
if (eir.class) {
dev->class = g_key_file_get_integer(key_file, peer, "Class", NULL);
+ dev->timestamp = g_key_file_get_integer(key_file, peer, "Timestamp",
+ NULL);
+
uuids = g_key_file_get_string_list(key_file, peer, "Services", NULL,
NULL);
if (uuids) {
static uint8_t get_device_timestamp(struct device *dev)
{
- DBG("Not implemented");
-
- /* TODO */
+ send_device_property(&dev->bdaddr, HAL_PROP_DEVICE_TIMESTAMP,
+ sizeof(dev->timestamp), &dev->timestamp);
- return HAL_STATUS_FAILED;
+ return HAL_STATUS_SUCCESS;
}
static void handle_get_remote_device_props_cmd(const void *buf, uint16_t len)