Diff between 4838d3b57ceb1db8e454f234f3360577518b6b6d and 28e71a1283c0778e2359d6b25f2d00fa7028b07e

Changed Files

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

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index 31558d0..49ca2b6 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -2860,6 +2860,17 @@ static bool set_security(struct gatt_device *device, int req_sec_level)
 	return true;
 }
 
+bool bt_gatt_set_security(const bdaddr_t *bdaddr, int sec_level)
+{
+	struct gatt_device *device;
+
+	device = find_device_by_addr(bdaddr);
+	if (!device)
+		return false;
+
+	return set_security(device, sec_level);
+}
+
 static bool set_auth_type(struct gatt_device *device, int auth_type)
 {
 	int sec_level;
diff --git a/android/gatt.h b/android/gatt.h
index 5ba9161..027dda3 100644
--- a/android/gatt.h
+++ b/android/gatt.h
@@ -38,3 +38,4 @@ bool bt_gatt_unregister_app(unsigned int id);
 
 bool bt_gatt_connect_app(unsigned int id, const bdaddr_t *addr);
 bool bt_gatt_disconnect_app(unsigned int id, const bdaddr_t *addr);
+bool bt_gatt_set_security(const bdaddr_t *bdaddr, int sec_level);