Create two new events to signal enabling and disabling of transports

This commit is contained in:
Torsten Grote
2015-12-16 13:48:56 -02:00
parent c7e4d5ffa9
commit 2d28dcada2
14 changed files with 132 additions and 18 deletions

View File

@@ -172,7 +172,7 @@ class DroidtoothPlugin implements DuplexPlugin {
}
LOG.info("Socket bound");
socket = ss;
callback.pollNow();
callback.transportEnabled();
acceptContactConnections();
}
});
@@ -196,6 +196,8 @@ class DroidtoothPlugin implements DuplexPlugin {
if (ss != null) ss.close();
} catch (IOException e) {
if (LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
} finally {
callback.transportDisabled();
}
}