Diff between 533301a6318aa3f1aafec7ba48840e34f657964a and c12323a5946a4d49c1197f5c7ac14cd22efbc2b6

Changed Files

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

Full Patch

diff --git a/android/bluetooth.c b/android/bluetooth.c
index 2a7c0e6..7a203af 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1218,6 +1218,14 @@ const char *bt_get_adapter_name(void)
 	return adapter.name;
 }
 
+bool bt_device_is_bonded(const bdaddr_t *bdaddr)
+{
+	if (g_slist_find_custom(bonded_devices, bdaddr, device_match))
+		return true;
+
+	return false;
+}
+
 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 dddbf20..3eef7a4 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -49,3 +49,4 @@ bool bt_le_set_advertising(bool advertising, bt_le_set_advertising_done cb,
 
 uint8_t bt_get_device_android_type(const bdaddr_t *addr);
 const char *bt_get_adapter_name(void);
+bool bt_device_is_bonded(const bdaddr_t *bdaddr);