diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:33:44 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:33:44 +0200 |
commit | 67a41170dd301761fb3b80507640e7ce049b8c23 (patch) | |
tree | c76506613fa4e379dd283cc955e34a24268732bd /src/main/java/de | |
parent | c1f929e068693467c3f485607f08ef88d4a5542c (diff) |
catch run time exception when starting service from event receiver
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/EventReceiver.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/EventReceiver.java b/src/main/java/de/pixart/messenger/services/EventReceiver.java index cdd1afe19..e4ec8cdb7 100644 --- a/src/main/java/de/pixart/messenger/services/EventReceiver.java +++ b/src/main/java/de/pixart/messenger/services/EventReceiver.java @@ -22,7 +22,11 @@ public class EventReceiver extends BroadcastReceiver { } final String action = intent.getAction(); if (action.equals("ui") || hasEnabledAccounts(context)) { - context.startService(mIntentForService); + try { + context.startService(mIntentForService); + } catch (RuntimeException e) { + Log.d(Config.LOGTAG, "EventReceiver was unable to start service"); + } } else { Log.d(Config.LOGTAG, "EventReceiver ignored action " + mIntentForService.getAction()); } |