aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-19 21:05:17 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-19 21:05:17 +0200
commit371c985c25d0b7ed348a1f2328673636acb939d7 (patch)
tree1cf341a3b6eaf43b33ffd031d82a1b42b403140c /src/eu/siacs/conversations/services
parenta6f9a742c0dffeaa2f7fc26ad65e9c972a9d2288 (diff)
made roster persistant aka enabled versioning again
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 5af53a3c..35e5fb51 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -616,14 +616,24 @@ public class XmppConnectionService extends Service {
@Override
public void onDestroy() {
- Log.d(LOGTAG, "stopping service");
super.onDestroy();
+ this.logoutAndSave();
+ }
+
+ @Override
+ public void onTaskRemoved(Intent rootIntent) {
+ super.onTaskRemoved(rootIntent);
+ this.logoutAndSave();
+ }
+
+ private void logoutAndSave() {
for (Account account : accounts) {
databaseBackend.writeRoster(account.getRoster());
if (account.getXmppConnection() != null) {
disconnect(account, true);
}
}
+ Log.d(LOGTAG,"good bye");
}
protected void scheduleWakeupCall(int seconds, boolean ping) {