diff --git a/android/bluetooth.c b/android/bluetooth.c
index 379d8ea..93b9cd7 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
discoverable = eir.flags & (EIR_LIM_DISC | EIR_GEN_DISC);
gatt_device_found_cb(bdaddr, bdaddr_type, rssi, data_len, data,
- discoverable);
+ discoverable,
+ dev->le_bonded);
}
if (!dev->bredr_paired && !dev->le_paired)
diff --git a/android/bluetooth.h b/android/bluetooth.h
index 6a3e766..a0b81a6 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
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);
+ const void *eir, bool discoverable,
+ bool bonded);
bool bt_le_discovery_start(bt_le_device_found cb);
typedef void (*bt_le_discovery_stopped)(void);
diff --git a/android/gatt.c b/android/gatt.c
index 89da60d..66328e2 100644
--- a/android/gatt.c
+++ b/android/gatt.c
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)
+ const void *eir,
+ bool discoverable, 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)
+ if (!scanning || (!discoverable && !bonded))
goto connect;
ba2str(addr, bda);