Search in sources :

Example 6 with TransferablePlaceholder

use of eu.siacs.conversations.entities.TransferablePlaceholder in project Conversations by siacs.

the class JingleConnection method fail.

private void fail(String errorMessage) {
    this.mJingleStatus = JINGLE_STATUS_FAILED;
    this.disconnectSocks5Connections();
    if (this.transport != null && this.transport instanceof JingleInbandTransport) {
        this.transport.disconnect();
    }
    FileBackend.close(mFileInputStream);
    FileBackend.close(mFileOutputStream);
    if (this.message != null) {
        if (this.responder.equals(account.getJid())) {
            this.message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_FAILED));
            if (this.file != null) {
                file.delete();
            }
            this.mJingleConnectionManager.updateConversationUi(true);
        } else {
            this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND_FAILED, errorMessage);
            this.message.setTransferable(null);
        }
    }
    this.mJingleConnectionManager.finishConnection(this);
}
Also used : TransferablePlaceholder(eu.siacs.conversations.entities.TransferablePlaceholder)

Aggregations

TransferablePlaceholder (eu.siacs.conversations.entities.TransferablePlaceholder)6 MenuItem (android.view.MenuItem)1 DownloadableFile (eu.siacs.conversations.entities.DownloadableFile)1 Message (eu.siacs.conversations.entities.Message)1 Transferable (eu.siacs.conversations.entities.Transferable)1 HttpDownloadConnection (eu.siacs.conversations.http.HttpDownloadConnection)1