--- android/bluetooth.c | 11 +++++++++++ android/bluetooth.h | 1 + 2 files changed, 12 insertions(+) diff --git a/android/bluetooth.c b/android/bluetooth.c index 54c69b8..a2ab445 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -3985,6 +3985,17 @@ static uint8_t select_device_bearer(struct device *dev) return dev->bredr ? BDADDR_BREDR : dev->bdaddr_type; } +uint8_t bt_device_last_seen_bearer(const bdaddr_t *bdaddr) +{ + struct device *dev; + + dev = find_device(bdaddr); + if (!dev) + return BDADDR_BREDR; + + return select_device_bearer(dev); +} + static bool device_is_paired(struct device *dev, uint8_t addr_type) { if (addr_type == BDADDR_BREDR) diff --git a/android/bluetooth.h b/android/bluetooth.h index dde477d..e00634c 100644 --- a/android/bluetooth.h +++ b/android/bluetooth.h @@ -58,6 +58,7 @@ bool bt_le_set_advertising(bool advertising, bt_le_set_advertising_done cb, uint8_t bt_get_device_android_type(const bdaddr_t *addr); bool bt_is_device_le(const bdaddr_t *addr); +uint8_t bt_device_last_seen_bearer(const bdaddr_t *bdaddr); const char *bt_get_adapter_name(void); bool bt_device_is_bonded(const bdaddr_t *bdaddr); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html