use of co.krypt.krypton.protocol.UnpairResponse in project krypton-android by kryptco.
the class Silo method unpair.
public void unpair(Pairing pairing, boolean sendResponse) {
if (sendResponse) {
Response unpairResponse = new Response();
unpairResponse.requestID = "";
unpairResponse.unpairResponse = new UnpairResponse();
try {
send(pairing, unpairResponse);
} catch (CryptoException | TransportException e) {
e.printStackTrace();
}
}
synchronized (pairingsLock) {
pairingStorage.unpair(pairing);
activePairingsByUUID.remove(pairing.uuid);
SQSPoller poller = pollers.remove(pairing);
if (poller != null) {
poller.stop();
}
bluetoothTransport.remove(pairing);
}
}
Aggregations