aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-11-30 10:45:39 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-11-30 10:45:39 +0100
commit1b9a91eb2f5c088cba80895aec199b21025e290d (patch)
tree8805a46b1ed4a4a319c05d52d76b67d5e544ce3c /src
parent9d744add3818bd6bdff7a042d8b183018bbea745 (diff)
renamed foreground service preference
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/SettingsActivity.java2
-rw-r--r--src/main/res/xml/preferences.xml2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
index 6e1d6c4b..47364b30 100644
--- a/src/main/java/eu/siacs/conversations/services/NotificationService.java
+++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java
@@ -34,6 +34,7 @@ import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.ui.ConversationActivity;
import eu.siacs.conversations.ui.ManageAccountActivity;
+import eu.siacs.conversations.ui.SettingsActivity;
import eu.siacs.conversations.ui.TimePreference;
import eu.siacs.conversations.utils.GeoHelper;
import eu.siacs.conversations.utils.UIHelper;
@@ -591,7 +592,7 @@ public class NotificationService {
errors.add(account);
}
}
- if (mXmppConnectionService.getPreferences().getBoolean("keep_foreground_service", false)) {
+ if (mXmppConnectionService.getPreferences().getBoolean(SettingsActivity.KEEP_FOREGROUND_SERVICE, false)) {
notificationManager.notify(FOREGROUND_NOTIFICATION_ID, createForegroundNotification());
}
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mXmppConnectionService);
diff --git a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
index 9c8beb09..6cc800fa 100644
--- a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
@@ -35,7 +35,7 @@ import eu.siacs.conversations.xmpp.jid.Jid;
public class SettingsActivity extends XmppActivity implements
OnSharedPreferenceChangeListener {
- public static final String KEEP_FOREGROUND_SERVICE = "keep_foreground_service";
+ public static final String KEEP_FOREGROUND_SERVICE = "enable_foreground_service";
public static final String AWAY_WHEN_SCREEN_IS_OFF = "away_when_screen_off";
public static final String TREAT_VIBRATE_AS_SILENT = "treat_vibrate_as_silent";
public static final String MANUALLY_CHANGE_PRESENCE = "manually_change_presence";
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index f6c3a54b..2ed24b2d 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -259,7 +259,7 @@
android:title="@string/pref_use_indicate_received"/>
<CheckBoxPreference
android:defaultValue="false"
- android:key="keep_foreground_service"
+ android:key="enable_foreground_service"
android:summary="@string/pref_keep_foreground_service_summary"
android:title="@string/pref_keep_foreground_service"/>
<Preference