mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 07:09:56 +01:00
Don't try to discover peers if discovery is already in progress.
This commit is contained in:
@@ -407,6 +407,10 @@ class AndroidBluetoothPlugin extends BluetoothPlugin<BluetoothServerSocket> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BluetoothDevice> discoverDevices() {
|
private List<BluetoothDevice> discoverDevices() {
|
||||||
|
if (adapter.isDiscovering()) {
|
||||||
|
LOG.info("Already discovering");
|
||||||
|
return emptyList();
|
||||||
|
}
|
||||||
List<BluetoothDevice> devices = new ArrayList<>();
|
List<BluetoothDevice> devices = new ArrayList<>();
|
||||||
BlockingQueue<Intent> intents = new LinkedBlockingQueue<>();
|
BlockingQueue<Intent> intents = new LinkedBlockingQueue<>();
|
||||||
QueueingReceiver receiver = new QueueingReceiver(intents);
|
QueueingReceiver receiver = new QueueingReceiver(intents);
|
||||||
|
|||||||
Reference in New Issue
Block a user