diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-06 04:13:21 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-06 04:13:21 +0100 |
commit | 0168f185ebb209dbfb69cb19bf221354c9a8561a (patch) | |
tree | 3a7add992f728cd60c933c54d0de72e1d88aed6d | |
parent | ac93f7419a40d9f94203d58dc00a5b51bea42ba5 (diff) |
bug fixes
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index a10ffb2b..143d3079 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -388,28 +388,22 @@ public class XmppConnectionService extends Service { for (Account account : accounts) { if (!isConnected) { account.setStatus(Account.STATUS_NO_INTERNET); - Log.d(LOGTAG,"set no internet status to account"); - break; } else { if (account.getStatus() == Account.STATUS_NO_INTERNET) { account.setStatus(Account.STATUS_OFFLINE); } } - if (account.getXmppConnection() == null) { - if ((!account.isOptionSet(Account.OPTION_DISABLED))&&(isConnected)) { + if (accountChangedListener!=null) { + accountChangedListener.onAccountListChangedListener(); + } + if ((!account.isOptionSet(Account.OPTION_DISABLED))&&(isConnected)) { + if (account.getXmppConnection() == null) { account.setXmppConnection(this.createConnection(account)); + } + if (account.getStatus()==Account.STATUS_OFFLINE) { Thread thread = new Thread(account.getXmppConnection()); thread.start(); } - } else { - if ((!account.isOptionSet(Account.OPTION_DISABLED))&&(isConnected)) { - if (account.getStatus()==Account.STATUS_OFFLINE) { - Thread thread = new Thread(account.getXmppConnection()); - thread.start(); - } - } else { - disconnect(account); - } } } return START_STICKY; |