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:
Torsten Grote
2016-08-04 16:44:28 -03:00
parent 054a0d467c
commit b04bde4f41
5 changed files with 15 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ class KeyAgreementConnector {
private volatile boolean connecting = false;
private volatile boolean alice = false;
public KeyAgreementConnector(Callbacks callbacks, Clock clock,
KeyAgreementConnector(Callbacks callbacks, Clock clock,
CryptoComponent crypto, PluginManager pluginManager,
Executor ioExecutor) {
this.callbacks = callbacks;
@@ -83,7 +83,7 @@ class KeyAgreementConnector {
return new Payload(commitment, descriptors);
}
public void stopListening() {
void stopListening() {
LOG.info("Stopping BQP listeners");
for (KeyAgreementListener l : listeners) {
l.close();