Diff between e2705e6da4d6f448d5b3ae435b1459443bcd1177 and c1902726cbad2571051e47e3650a5100fa60863b

Changed Files

File Additions Deletions Status
android/gatt.c +1 -5 modified

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index 49ca2b6..11d7a2c 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1433,7 +1433,6 @@ reply:
 
 static int connect_le(struct gatt_device *dev)
 {
-	BtIOSecLevel sec_level;
 	GIOChannel *io;
 	GError *gerr = NULL;
 	char addr[18];
@@ -1450,9 +1449,6 @@ static int connect_le(struct gatt_device *dev)
 
 	DBG("Connection attempt to: %s", addr);
 
-	sec_level = bt_device_is_bonded(&dev->bdaddr) ? BT_IO_SEC_MEDIUM :
-								BT_IO_SEC_LOW;
-
 	/*
 	 * If address type is random it might be that IRK was received and
 	 * random is just for faking Android Framework. ID address should be
@@ -1478,7 +1474,7 @@ static int connect_le(struct gatt_device *dev)
 			BT_IO_OPT_DEST_BDADDR, bdaddr,
 			BT_IO_OPT_DEST_TYPE, bdaddr_type,
 			BT_IO_OPT_CID, ATT_CID,
-			BT_IO_OPT_SEC_LEVEL, sec_level,
+			BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
 			BT_IO_OPT_INVALID);
 	if (!io) {
 		error("gatt: Failed bt_io_connect(%s): %s", addr,