diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-19 17:21:33 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-19 17:21:33 +0200 |
commit | 2a185c8fc97ad82525ae18efe67026019d04442d (patch) | |
tree | 8969c9512921b20ad77520141632bfc323d6e42b /src/eu/siacs/conversations/services/EventReceiver.java | |
parent | 3da0d5adceca102502e4344bb368a3f9f33da3c6 (diff) |
background daemon doesn't start automatically if there are no enabled accounts. fixed #443 fixed #442
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/services/EventReceiver.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/services/EventReceiver.java b/src/eu/siacs/conversations/services/EventReceiver.java index c0bf67f3..e2445b2a 100644 --- a/src/eu/siacs/conversations/services/EventReceiver.java +++ b/src/eu/siacs/conversations/services/EventReceiver.java @@ -1,5 +1,6 @@ package eu.siacs.conversations.services; +import eu.siacs.conversations.persistance.DatabaseBackend; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -14,7 +15,9 @@ public class EventReceiver extends BroadcastReceiver { } else { mIntentForService.setAction("other"); } - context.startService(mIntentForService); + if (intent.getAction().equals("ui") || DatabaseBackend.getInstance(context).hasEnabledAccounts()) { + context.startService(mIntentForService); + } } } |