From 0f4ccb64ba03630568b20c44814908c06c7aa88e Mon Sep 17 00:00:00 2001 From: Christian S Date: Fri, 15 Apr 2016 21:27:28 +0200 Subject: make foreground service always enabled and don't let the user choose the foreground settings --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index b77bc4c1d..d6866ed45 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -514,10 +514,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; @@ -776,7 +772,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); -- cgit v1.2.3