renamed foreground service preference
This commit is contained in:
parent
9d744add38
commit
1b9a91eb2f
|
@ -34,6 +34,7 @@ import eu.siacs.conversations.entities.Conversation;
|
||||||
import eu.siacs.conversations.entities.Message;
|
import eu.siacs.conversations.entities.Message;
|
||||||
import eu.siacs.conversations.ui.ConversationActivity;
|
import eu.siacs.conversations.ui.ConversationActivity;
|
||||||
import eu.siacs.conversations.ui.ManageAccountActivity;
|
import eu.siacs.conversations.ui.ManageAccountActivity;
|
||||||
|
import eu.siacs.conversations.ui.SettingsActivity;
|
||||||
import eu.siacs.conversations.ui.TimePreference;
|
import eu.siacs.conversations.ui.TimePreference;
|
||||||
import eu.siacs.conversations.utils.GeoHelper;
|
import eu.siacs.conversations.utils.GeoHelper;
|
||||||
import eu.siacs.conversations.utils.UIHelper;
|
import eu.siacs.conversations.utils.UIHelper;
|
||||||
|
@ -591,7 +592,7 @@ public class NotificationService {
|
||||||
errors.add(account);
|
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());
|
notificationManager.notify(FOREGROUND_NOTIFICATION_ID, createForegroundNotification());
|
||||||
}
|
}
|
||||||
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mXmppConnectionService);
|
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mXmppConnectionService);
|
||||||
|
|
|
@ -35,7 +35,7 @@ import eu.siacs.conversations.xmpp.jid.Jid;
|
||||||
public class SettingsActivity extends XmppActivity implements
|
public class SettingsActivity extends XmppActivity implements
|
||||||
OnSharedPreferenceChangeListener {
|
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 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 TREAT_VIBRATE_AS_SILENT = "treat_vibrate_as_silent";
|
||||||
public static final String MANUALLY_CHANGE_PRESENCE = "manually_change_presence";
|
public static final String MANUALLY_CHANGE_PRESENCE = "manually_change_presence";
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
android:title="@string/pref_use_indicate_received"/>
|
android:title="@string/pref_use_indicate_received"/>
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="keep_foreground_service"
|
android:key="enable_foreground_service"
|
||||||
android:summary="@string/pref_keep_foreground_service_summary"
|
android:summary="@string/pref_keep_foreground_service_summary"
|
||||||
android:title="@string/pref_keep_foreground_service"/>
|
android:title="@string/pref_keep_foreground_service"/>
|
||||||
<Preference
|
<Preference
|
||||||
|
|
Loading…
Reference in New Issue