ignore startService failure
some nokia devices with Android 9 fail to start the service from the activity sometimes. since this is probably a race it should be save to ignore this
This commit is contained in:
parent
25856992d1
commit
459db1a0a3
|
@ -217,7 +217,11 @@ public abstract class XmppActivity extends ActionBarActivity {
|
|||
public void connectToBackend() {
|
||||
Intent intent = new Intent(this, XmppConnectionService.class);
|
||||
intent.setAction("ui");
|
||||
try {
|
||||
startService(intent);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.w(Config.LOGTAG,"unable to start service from "+getClass().getSimpleName());
|
||||
}
|
||||
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue