From 94aee445e721f80bc4a4ae3572141ea6af38fe4a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 13 Aug 2016 12:40:48 +0200 Subject: [PATCH] start file observer in background --- .../conversations/services/XmppConnectionService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 426c6f1a1..f82285a94 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -784,7 +784,12 @@ public class XmppConnectionService extends Service { restoreFromDatabase(); getContentResolver().registerContentObserver(ContactsContract.Contacts.CONTENT_URI, true, contactObserver); - this.fileObserver.startWatching(); + new Thread(new Runnable() { + @Override + public void run() { + fileObserver.startWatching(); + } + }).start(); if (Config.supportOpenPgp()) { this.pgpServiceConnection = new OpenPgpServiceConnection(getApplicationContext(), "org.sufficientlysecure.keychain", new OpenPgpServiceConnection.OnBound() { @Override