diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-01-16 20:25:01 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-01-16 20:25:01 +0100 |
commit | dbbe76e6a0f5317b97dfa5f0ce31fcd9902463e3 (patch) | |
tree | 79e59ef165d97c5db9a6eb02254c3bdc74c5dd33 | |
parent | 138f83a1c1845c80c921d5fddda6d9baebf65628 (diff) |
handle swiping away from recent apps correctly
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 5 |
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) { |