aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-01-16 20:25:01 +0100
committerChristian Schneppe <christian@pix-art.de>2017-01-16 20:25:01 +0100
commitdbbe76e6a0f5317b97dfa5f0ce31fcd9902463e3 (patch)
tree79e59ef165d97c5db9a6eb02254c3bdc74c5dd33
parent138f83a1c1845c80c921d5fddda6d9baebf65628 (diff)
handle swiping away from recent apps correctly
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index fc5e1ba54..25a4bc578 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -1172,6 +1172,11 @@ public class XmppConnectionService extends Service {
@Override
public void onTaskRemoved(final Intent rootIntent) {
super.onTaskRemoved(rootIntent);
+ if (!Config.USE_ALWAYS_FOREGROUND) {
+ this.logoutAndSave(false);
+ } else {
+ Log.d(Config.LOGTAG,"ignoring onTaskRemoved because foreground service is activated");
+ }
}
private void logoutAndSave(boolean stop) {