It is possible that a device is already connected
as a temporary device, using a BLE random address.
In such situation, adapter should not remove that
device during discovry cleanup action.
This patch skips removing device if device is
already connected.
Change-Id: I93dc0003e0b1a6917c6a3d9ebc93f04c89205346
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
next = g_slist_next(l);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (device_is_temporary(dev) && !device_is_connectable(dev)
+ && !btd_device_is_connected(dev))
+#else
if (device_is_temporary(dev) && !device_is_connectable(dev))
+#endif
btd_adapter_remove_device(adapter, dev);
}