From b23f8bd472f5c6bc809dddd26dd69791c9ed7dd8 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 8 Sep 2014 20:09:44 +0200 Subject: introduced downloadable interface. reverted some of the changes made to OTR --- src/eu/siacs/conversations/entities/Message.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/eu/siacs/conversations/entities/Message.java') diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index d70374a9..5cbd68dd 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -2,7 +2,6 @@ package eu.siacs.conversations.entities; import eu.siacs.conversations.Config; import eu.siacs.conversations.R; -import eu.siacs.conversations.xmpp.jingle.JingleConnection; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -60,7 +59,7 @@ public class Message extends AbstractEntity { protected transient Conversation conversation = null; - protected transient JingleConnection jingleConnection = null; + protected transient Downloadable downloadable = null; private Message() { @@ -151,8 +150,6 @@ public class Message extends AbstractEntity { public String getReadableBody(Context context) { if ((encryption == ENCRYPTION_PGP) && (type == TYPE_TEXT)) { return context.getText(R.string.encrypted_message_received).toString(); - } else if (encryption == ENCRYPTION_OTR && type == TYPE_TEXT && status == STATUS_RECEPTION_FAILED) { - return context.getText(R.string.unable_to_decrypt_otr_message).toString(); } else if ((encryption == ENCRYPTION_OTR) && (type == TYPE_IMAGE)) { return context.getText(R.string.encrypted_image_received).toString(); } else if (encryption == ENCRYPTION_DECRYPTION_FAILED) { @@ -270,12 +267,12 @@ public class Message extends AbstractEntity { } } - public void setJingleConnection(JingleConnection connection) { - this.jingleConnection = connection; + public void setDownloadable(Downloadable downloadable) { + this.downloadable = downloadable; } - public JingleConnection getJingleConnection() { - return this.jingleConnection; + public Downloadable getDownloadable() { + return this.downloadable; } public static Message createStatusMessage(Conversation conversation) { -- cgit v1.2.3