Diff between 1dd0a92167db8093bcfb935f8909aaee5e42c20e and 1ed53a8c98b1f0e07127fe7a06a53f56f7dcf0c6

Changed Files

File Additions Deletions Status
android/bluetooth.c +1 -4 modified
android/bluetooth.h +1 -2 modified
android/gatt.c +2 -3 modified

Full Patch

diff --git a/android/bluetooth.c b/android/bluetooth.c
index 169f0bf..48085e9 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1946,12 +1946,9 @@ static void update_found_device(const bdaddr_t *bdaddr, uint8_t bdaddr_type,
 
 	/* Notify Gatt if its registered for LE events */
 	if (bdaddr_type != BDADDR_BREDR && gatt_device_found_cb) {
-		bool discoverable;
 		bdaddr_t *addr;
 		uint8_t addr_type;
 
-		discoverable = eir.flags & (EIR_LIM_DISC | EIR_GEN_DISC);
-
 		/*
 		 * If RPA is set it means that IRK was received and ID address
 		 * is being used. Android Framework is still using old RPA and
@@ -1967,7 +1964,7 @@ static void update_found_device(const bdaddr_t *bdaddr, uint8_t bdaddr_type,
 		}
 
 		gatt_device_found_cb(addr, addr_type, rssi, data_len, data,
-						discoverable, dev->le_bonded);
+								dev->le_bonded);
 	}
 
 	if (!dev->bredr_paired && !dev->le_paired)
diff --git a/android/bluetooth.h b/android/bluetooth.h
index 8970559..4b7a70d 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -42,8 +42,7 @@ void bt_adapter_remove_record(uint32_t handle);
 
 typedef void (*bt_le_device_found)(const bdaddr_t *addr, uint8_t addr_type,
 					int rssi, uint16_t eir_len,
-					const void *eir, bool discoverable,
-					bool bonded);
+					const void *eir, bool bonded);
 bool bt_le_register(bt_le_device_found cb);
 void bt_le_unregister(void);
 
diff --git a/android/gatt.c b/android/gatt.c
index 2aa52b0..ce55b26 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1658,15 +1658,14 @@ static void bt_le_discovery_stop_cb(void)
 
 static void le_device_found_handler(const bdaddr_t *addr, uint8_t addr_type,
 						int rssi, uint16_t eir_len,
-						const void *eir,
-						bool discoverable, bool bonded)
+						const void *eir, bool bonded)
 {
 	uint8_t buf[IPC_MTU];
 	struct hal_ev_gatt_client_scan_result *ev = (void *) buf;
 	struct gatt_device *dev;
 	char bda[18];
 
-	if (!scanning || (!discoverable && !bonded))
+	if (!scanning)
 		goto connect;
 
 	ba2str(addr, bda);