aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-07-06 18:56:35 +0200
committersteckbrief <steckbrief@chefmail.de>2017-07-06 18:56:35 +0200
commit2d41916750e2c31b57cf6325441ff37a8639fe93 (patch)
treee3ab3bf04a43761e243a5f36a9d815e13db75933 /src/main/java/de
parent9599b54329d0dbd7b9c69146af99caf90f15b9d7 (diff)
Fixed 'Only one Looper may be created per thread' RuntimeException according to https://stackoverflow.com/questions/23038682/java-lang-runtimeexception-only-one-looper-may-be-created-per-thread/24115631#24115631
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java b/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java
index 6a9b5c13..1d1f0108 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java
@@ -1018,7 +1018,10 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
account.initAccountServices(XmppConnectionService.this); //roster needs to be loaded at this stage
}
ImageUtil.evictBitmapCache();
- Looper.prepare();
+ if (null == Looper.myLooper()) {
+ Looper.prepare();
+ }
+
loadPhoneContacts();
Logging.d(Config.LOGTAG, "restoring messages");
for (Conversation conversation : conversations) {