aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/services/XmppConnectionService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/gultsch/chat/services/XmppConnectionService.java')
-rw-r--r--src/de/gultsch/chat/services/XmppConnectionService.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/de/gultsch/chat/services/XmppConnectionService.java b/src/de/gultsch/chat/services/XmppConnectionService.java
index fbbaca5c..ae1140ee 100644
--- a/src/de/gultsch/chat/services/XmppConnectionService.java
+++ b/src/de/gultsch/chat/services/XmppConnectionService.java
@@ -95,8 +95,11 @@ public class XmppConnectionService extends Service {
public int onStartCommand(Intent intent, int flags, int startId) {
for (Account account : accounts) {
if (!connections.containsKey(account)) {
-
- this.connections.put(account, this.createConnection(account));
+ if (!account.isOptionSet(Account.OPTION_DISABLED)) {
+ this.connections.put(account, this.createConnection(account));
+ } else {
+ Log.d(LOGTAG,account.getJid()+": not starting because it's disabled");
+ }
}
}
return START_STICKY;
@@ -253,7 +256,11 @@ public class XmppConnectionService extends Service {
connection.disconnect();
this.connections.remove(account);
}
- this.connections.put(account, this.createConnection(account));
+ if (!account.isOptionSet(Account.OPTION_DISABLED)) {
+ this.connections.put(account, this.createConnection(account));
+ } else {
+ Log.d(LOGTAG,account.getJid()+": not starting because it's disabled");
+ }
if (accountChangedListener!=null) accountChangedListener.onAccountListChangedListener();
}