From 71a7f09d410e95951ed4d7eec5df8864cfdf13d1 Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Sun, 26 Jul 2015 15:36:25 -0400 Subject: [PATCH] prevent multiple refreshes due to time of day alarm --- .../de/danoeh/antennapod/core/preferences/UserPreferences.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java index c1b913c27..9f6b144ef 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java @@ -588,7 +588,7 @@ public class UserPreferences { Calendar alarm = (Calendar)now.clone(); alarm.set(Calendar.HOUR_OF_DAY, hoursOfDay); alarm.set(Calendar.MINUTE, minute); - if(alarm.before(now)) { + if (alarm.before(now) || alarm.equals(now)) { alarm.add(Calendar.DATE, 1); } Log.d(TAG, "Alarm set for: " + alarm.toString() + " : " + alarm.getTimeInMillis());