aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-13 03:52:41 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-13 03:52:41 +0100
commita80e3131be975e35c85b3f746cef233fafebaae0 (patch)
treec5997e923a0d32527719546067429e78af7f33e2 /src/eu/siacs/conversations/services
parenteadebeb77cbc4f5b49d484b8a64058630385afe6 (diff)
contact picture generation centralized + basic registry stuff
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 1c8e56f4..81107426 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -396,7 +396,7 @@ public class XmppConnectionService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
- //Log.d(LOGTAG,"calling start service. caller was:"+intent.getAction());
+ Log.d(LOGTAG,"calling start service. caller was:"+intent.getAction());
ConnectivityManager cm = (ConnectivityManager) getApplicationContext()
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
@@ -441,6 +441,7 @@ public class XmppConnectionService extends Service {
Log.d(LOGTAG,account.getJid()+": time out during connect reconnecting");
reconnectAccount(account,true);
} else {
+ Log.d(LOGTAG,"seconds since last connect:"+((SystemClock.elapsedRealtime() - account.getXmppConnection().lastConnect) / 1000));
Log.d(LOGTAG,account.getJid()+": status="+account.getStatus());
// TODO notify user of ssl cert problem or auth problem or what ever
}
@@ -836,6 +837,7 @@ public class XmppConnectionService extends Service {
} else {
conversation.setMode(Conversation.MODE_SINGLE);
}
+ conversation.setMessages(databaseBackend.getMessages(conversation, 50));
this.databaseBackend.updateConversation(conversation);
conversation.setContact(findContact(account,
conversation.getContactJid()));
@@ -887,7 +889,7 @@ public class XmppConnectionService extends Service {
public void createAccount(Account account) {
databaseBackend.createAccount(account);
this.accounts.add(account);
- account.setXmppConnection(this.createConnection(account));
+ this.reconnectAccount(account, false);
if (accountChangedListener != null)
accountChangedListener.onAccountListChangedListener();
}