diff options
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 5fd8a053b..521a0bcf0 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -264,7 +264,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } } } - account.getRoster().clearPresences(); mJingleConnectionManager.cancelInTransmission(); fetchRosterFromServer(account); fetchBookmarks(account); @@ -516,10 +515,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa case ACTION_CLEAR_NOTIFICATION: mNotificationService.clear(); break; - case ACTION_DISABLE_FOREGROUND: - getPreferences().edit().putBoolean("keep_foreground_service", false).commit(); - toggleForegroundService(); - break; case ACTION_TRY_AGAIN: resetAllAttemptCounts(false); interactive = true; @@ -793,7 +788,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public void toggleForegroundService() { - if (getPreferences().getBoolean("keep_foreground_service", false)) { + if (Config.USE_ALWAYS_FOREGROUND) { startForeground(NotificationService.FOREGROUND_NOTIFICATION_ID, this.mNotificationService.createForegroundNotification()); } else { stopForeground(true); @@ -2242,6 +2237,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa sendOfflinePresence(account); } account.getXmppConnection().disconnect(force); + account.getRoster().clearPresences(); } } @@ -2664,7 +2660,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa scheduleWakeUpCall(Config.CONNECT_DISCO_TIMEOUT, account.getUuid().hashCode()); } else { disconnect(account, force); - account.getRoster().clearPresences(); connection.resetEverything(); account.getAxolotlService().resetBrokenness(); } @@ -2756,11 +2751,11 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public boolean allowMessageCorrection() { - return getPreferences().getBoolean("allow_message_correction", false); + return getPreferences().getBoolean("allow_message_correction", true); } public boolean sendChatStates() { - return getPreferences().getBoolean("chat_states", false); + return getPreferences().getBoolean("chat_states", true); } public boolean saveEncryptedMessages() { @@ -2772,7 +2767,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public boolean indicateReceived() { - return getPreferences().getBoolean("indicate_received", false); + return getPreferences().getBoolean("indicate_received", true); } public boolean useTorToConnect() { |