summaryrefslogtreecommitdiff
path: root/android/bluetooth.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-12-17 16:49:03 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-12-19 09:44:48 -0200
commita35305c0d16208f4aae7795d2bb27981f6cb6c52 (patch)
treebe3c6770589e2629c6816d6d1dd0fc838f4e69a5 /android/bluetooth.c
parent9180d1f8e8485b065f4a72c0f1dd05af9c662576 (diff)
downloadbluez-a35305c0d16208f4aae7795d2bb27981f6cb6c52.tar.gz
android/bluetooth: Add API to check if device is bonding
Some modules like GATT might be interested in information about ongoing bonding on device. It can be useful e.g. to take decision if GATT can do service search or should wait until bonding is done.
Diffstat (limited to 'android/bluetooth.c')
-rw-r--r--android/bluetooth.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/bluetooth.c b/android/bluetooth.c
index a0e2ce554..eff5b08aa 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1778,6 +1778,17 @@ void bt_paired_unregister(bt_paired_device_cb cb)
queue_remove(paired_cb_list, cb);
}
+bool bt_is_pairing(const bdaddr_t *addr)
+{
+ struct device *dev;
+
+ dev = find_device(addr);
+ if (!dev)
+ return false;
+
+ return dev->pairing;
+}
+
static bool rssi_above_threshold(int old, int new)
{
/* only 8 dBm or more */