1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-08-13 16:53:50 -04:00

ConversationActivity: onStatusUpdate(): Check if service is already connected and initialized - Fixes #54

This commit is contained in:
Sebastian Kaspari 2011-04-12 23:37:02 +02:00
parent ded6485f6b
commit 9387a02068

View File

@ -468,6 +468,11 @@ public class ConversationActivity extends Activity implements ServiceConnection,
return;
}
// Service is not connected or initialized yet - See #54
if (binder == null || binder.getService() == null || binder.getService().getSettings() == null) {
return;
}
if (!binder.getService().getSettings().isReconnectEnabled()) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getResources().getString(R.string.reconnect_after_disconnect, server.getTitle()))