mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
Fix crashes when no Bluetooth or no Camera is available
Briar crashed when run in a device without bluetooth or without camera such as an emulator. Closes #514
This commit is contained in:
@@ -363,6 +363,7 @@ class BluetoothPlugin implements DuplexPlugin {
|
||||
|
||||
@Override
|
||||
public KeyAgreementListener createKeyAgreementListener(byte[] commitment) {
|
||||
if (!running) return null;
|
||||
// No truncation necessary because COMMIT_LENGTH = 16
|
||||
String uuid = UUID.nameUUIDFromBytes(commitment).toString();
|
||||
if (LOG.isLoggable(INFO)) LOG.info("Key agreement UUID " + uuid);
|
||||
@@ -490,7 +491,7 @@ class BluetoothPlugin implements DuplexPlugin {
|
||||
|
||||
private final StreamConnectionNotifier ss;
|
||||
|
||||
public BluetoothKeyAgreementListener(TransportDescriptor descriptor,
|
||||
BluetoothKeyAgreementListener(TransportDescriptor descriptor,
|
||||
StreamConnectionNotifier ss) {
|
||||
super(descriptor);
|
||||
this.ss = ss;
|
||||
|
||||
Reference in New Issue
Block a user