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() {
|
public void connectToBackend() {
|
||||||
Intent intent = new Intent(this, XmppConnectionService.class);
|
Intent intent = new Intent(this, XmppConnectionService.class);
|
||||||
intent.setAction("ui");
|
intent.setAction("ui");
|
||||||
|
try {
|
||||||
startService(intent);
|
startService(intent);
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
Log.w(Config.LOGTAG,"unable to start service from "+getClass().getSimpleName());
|
||||||
|
}
|
||||||
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue