aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services/EventReceiver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/services/EventReceiver.java')
-rw-r--r--src/main/java/de/pixart/messenger/services/EventReceiver.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/de/pixart/messenger/services/EventReceiver.java b/src/main/java/de/pixart/messenger/services/EventReceiver.java
index 03bf68ed9..8b3a6b415 100644
--- a/src/main/java/de/pixart/messenger/services/EventReceiver.java
+++ b/src/main/java/de/pixart/messenger/services/EventReceiver.java
@@ -25,16 +25,7 @@ public class EventReceiver extends BroadcastReceiver {
}
final String action = originalIntent.getAction();
if (action.equals("ui") || hasEnabledAccounts(context)) {
- try {
- if (Compatibility.runsAndTargetsTwentySix(context)) {
- intentForService.putExtra(EXTRA_NEEDS_FOREGROUND_SERVICE, true);
- ContextCompat.startForegroundService(context, intentForService);
- } else {
- context.startService(intentForService);
- }
- } catch (RuntimeException e) {
- Log.d(Config.LOGTAG, "EventReceiver was unable to start service");
- }
+ Compatibility.startService(context, intentForService);
} else {
Log.d(Config.LOGTAG, "EventReceiver ignored action " + intentForService.getAction());
}