Diff between 9180d1f8e8485b065f4a72c0f1dd05af9c662576 and a35305c0d16208f4aae7795d2bb27981f6cb6c52

Changed Files

File Additions Deletions Status
android/bluetooth.c +11 -0 modified
android/bluetooth.h +1 -0 modified

Full Patch

diff --git a/android/bluetooth.c b/android/bluetooth.c
index a0e2ce5..eff5b08 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 */
diff --git a/android/bluetooth.h b/android/bluetooth.h
index e5d23a9..9e7ab2c 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -94,3 +94,4 @@ void bt_unpaired_unregister(bt_unpaired_device_cb cb);
 typedef void (*bt_paired_device_cb)(const bdaddr_t *addr, uint8_t type);
 bool bt_paired_register(bt_paired_device_cb cb);
 void bt_paired_unregister(bt_paired_device_cb cb);
+bool bt_is_pairing(const bdaddr_t *addr);