aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2016-04-15 21:27:28 +0200
committerChristian S <christian@pix-art.de>2016-04-15 21:27:28 +0200
commit0f4ccb64ba03630568b20c44814908c06c7aa88e (patch)
tree99e9f4d83e01c2f8fe8e5191df54b80c55e02a7f /src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
parent00f9ca537cd3f8095b664427b52a8989008a2dfe (diff)
make foreground service always enabled
and don't let the user choose the foreground settings
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java6
1 files changed, 1 insertions, 5 deletions
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);