start file observer in background

This commit is contained in:
Daniel Gultsch 2016-08-13 12:40:48 +02:00
parent 4736d12e99
commit 94aee445e7

View File

@ -784,7 +784,12 @@ public class XmppConnectionService extends Service {
restoreFromDatabase(); restoreFromDatabase();
getContentResolver().registerContentObserver(ContactsContract.Contacts.CONTENT_URI, true, contactObserver); 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()) { if (Config.supportOpenPgp()) {
this.pgpServiceConnection = new OpenPgpServiceConnection(getApplicationContext(), "org.sufficientlysecure.keychain", new OpenPgpServiceConnection.OnBound() { this.pgpServiceConnection = new OpenPgpServiceConnection(getApplicationContext(), "org.sufficientlysecure.keychain", new OpenPgpServiceConnection.OnBound() {
@Override @Override