From ffd08658e1a9333b6af896aa3fc853c5184fc571 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Tue, 1 Aug 2017 10:22:24 +0200 Subject: put settings defaults into resource file --- src/main/java/de/pixart/messenger/services/NotificationService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/pixart/messenger/services/NotificationService.java') diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 0397a8950..ee5db3156 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -90,7 +90,7 @@ public class NotificationService { } public boolean notificationsEnabled() { - return mXmppConnectionService.getPreferences().getBoolean("show_notification", true); + return mXmppConnectionService.getPreferences().getBoolean("show_notification", mXmppConnectionService.getResources().getBoolean(R.bool.show_notification)); } private boolean notificationsFromStrangers() { @@ -99,7 +99,7 @@ public class NotificationService { } public boolean isQuietHours() { - if (!mXmppConnectionService.getPreferences().getBoolean("enable_quiet_hours", false)) { + if (!mXmppConnectionService.getPreferences().getBoolean("enable_quiet_hours", mXmppConnectionService.getResources().getBoolean(R.bool.enable_quiet_hours))) { return false; } final long startTime = mXmppConnectionService.getPreferences().getLong("quiet_hours_start", TimePreference.DEFAULT_VALUE) % Config.MILLISECONDS_IN_DAY; -- cgit v1.2.3