catch run time exception when starting service from event receiver
This commit is contained in:
parent
7f7b7fca0b
commit
9a36627e67
|
@ -24,7 +24,11 @@ public class EventReceiver extends BroadcastReceiver {
|
|||
}
|
||||
final String action = intent.getAction();
|
||||
if (action.equals("ui") || hasEnabledAccounts(context)) {
|
||||
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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue