aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-10 14:04:35 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-10 14:04:35 +0200
commit1a6e42e7c15275fa0f44bcc2af8c15e0fec57760 (patch)
treee5c68fa7f7ab31af066b587290ffab428755c82f /src/eu/siacs
parent9dec8e761e5bcffbbe4f11018387f461472de8c8 (diff)
potential fix for rejected execution exception
Diffstat (limited to 'src/eu/siacs')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index 80369bbff..ab7ece234 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -4,6 +4,7 @@ import java.io.FileNotFoundException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
+import java.util.concurrent.RejectedExecutionException;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Contact;
@@ -185,7 +186,7 @@ public class ConversationActivity extends XmppActivity {
Message latestMessage = conv.getLatestMessage();
- if (latestMessage.getType() == Message.TYPE_TEXT) {
+ if (latestMessage.getType() == Message.TYPE_TEXT || latestMessage.getType() == Message.TYPE_PRIVATE) {
if ((latestMessage.getEncryption() != Message.ENCRYPTION_PGP)
&& (latestMessage.getEncryption() != Message.ENCRYPTION_DECRYPTION_FAILED)) {
convLastMsg.setText(conv.getLatestMessage().getBody());
@@ -880,7 +881,11 @@ public class ConversationActivity extends XmppActivity {
final AsyncDrawable asyncDrawable = new AsyncDrawable(
getResources(), null, task);
imageView.setImageDrawable(asyncDrawable);
- task.execute(message);
+ try {
+ task.execute(message);
+ } catch (RejectedExecutionException e) {
+ return;
+ }
}
}
}