diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/NotificationService.java | 5 | ||||
-rw-r--r-- | src/main/res/values/defaults.xml | 1 | ||||
-rw-r--r-- | src/main/res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/main/res/xml/preferences.xml | 12 |
4 files changed, 0 insertions, 20 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 913dd6f1e..d7624c577 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -181,17 +181,12 @@ public class NotificationService { public boolean notify(final Message message) { final Conversation conversation = (Conversation) message.getConversation(); return message.getStatus() == Message.STATUS_RECEIVED - && notificationsEnabled() && !conversation.isMuted() && (conversation.alwaysNotify() || wasHighlightedOrPrivate(message)) && (!conversation.isWithStranger() || notificationsFromStrangers()) ; } - private boolean notificationsEnabled() { - return mXmppConnectionService.getBooleanPreference("show_notification", R.bool.show_notification); - } - private boolean notificationsFromStrangers() { return mXmppConnectionService.getBooleanPreference("notifications_from_strangers", R.bool.notifications_from_strangers); } diff --git a/src/main/res/values/defaults.xml b/src/main/res/values/defaults.xml index 214dbe642..4867a8e95 100644 --- a/src/main/res/values/defaults.xml +++ b/src/main/res/values/defaults.xml @@ -62,7 +62,6 @@ <integer name="auto_accept_filesize_wifi">10485760</integer> <integer name="auto_accept_filesize_mobile">524288</integer> <integer name="auto_accept_filesize_roaming">0</integer> - <bool name="show_notification">true</bool> <bool name="vibrate_on_notification">true</bool> <bool name="led">true</bool> <string name="notification_ringtone">content://settings/system/notification_sound</string> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 0c05f4f3b..43794ee03 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -107,8 +107,6 @@ <string name="pref_accept_files_summary_mobileroaming">When connected with mobile data in roaming automatically accept files smaller than…</string> <string name="pref_attachments">Attachments</string> <string name="pref_notification_settings">Notification</string> - <string name="pref_notifications">Notifications</string> - <string name="pref_notifications_summary">Notify when a new message arrives</string> <string name="pref_vibrate">Vibrate</string> <string name="pref_vibrate_summary">Vibrate when a new message arrives</string> <string name="pref_led">LED Notification</string> diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml index 73d817782..d6241a5ff 100644 --- a/src/main/res/xml/preferences.xml +++ b/src/main/res/xml/preferences.xml @@ -86,18 +86,11 @@ android:value="notifications" /> </intent> <CheckBoxPreference - android:defaultValue="@bool/show_notification" - android:key="show_notification" - android:summary="@string/pref_notifications_summary" - android:title="@string/pref_notifications" /> - <CheckBoxPreference android:defaultValue="@bool/headsup_notifications" - android:dependency="show_notification" android:key="notification_headsup" android:summary="@string/pref_headsup_notifications_summary" android:title="@string/pref_headsup_notifications" /> <PreferenceScreen - android:dependency="show_notification" android:key="quiet_hours" android:summary="@string/pref_quiet_hours_summary" android:title="@string/title_pref_quiet_hours"> @@ -129,31 +122,26 @@ </PreferenceScreen> <CheckBoxPreference android:defaultValue="@bool/vibrate_on_notification" - android:dependency="show_notification" android:key="vibrate_on_notification" android:summary="@string/pref_vibrate_summary" android:title="@string/pref_vibrate" /> <CheckBoxPreference android:defaultValue="@bool/led" - android:dependency="show_notification" android:key="led" android:summary="@string/pref_led_summary" android:title="@string/pref_led" /> <RingtonePreference android:defaultValue="@string/notification_ringtone" - android:dependency="show_notification" android:key="notification_ringtone" android:ringtoneType="notification" android:summary="@string/pref_sound_summary" android:title="@string/pref_sound" /> <CheckBoxPreference android:defaultValue="@bool/notifications_from_strangers" - android:dependency="show_notification" android:key="notifications_from_strangers" android:summary="@string/pref_notifications_from_strangers_summary" android:title="@string/pref_notifications_from_strangers" /> <PreferenceScreen - android:dependency="show_notification" android:key="more_notification_settings" android:summary="@string/pref_more_notification_settings_summary" android:title="@string/pref_more_notification_settings"> |