if brackets

This commit is contained in:
jens 2023-12-31 16:53:59 +01:00
parent d75cf137ba
commit c61c5ba14c

View File

@ -291,7 +291,10 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
if (alarmManager == null) if (alarmManager == null)
{ {
alarmManager = (AlarmManager) Miscellaneous.getAnyContext().getSystemService(Context.ALARM_SERVICE); alarmManager = (AlarmManager) Miscellaneous.getAnyContext().getSystemService(Context.ALARM_SERVICE);
}
if(pi == null)
{
Intent intent = new Intent(Miscellaneous.getAnyContext(), CalendarReceiver.class); Intent intent = new Intent(Miscellaneous.getAnyContext(), CalendarReceiver.class);
intent.setAction(calendarAlarmAction); intent.setAction(calendarAlarmAction);
pi = PendingIntent.getBroadcast(AutomationService.getInstance(), 0, intent, 0); pi = PendingIntent.getBroadcast(AutomationService.getInstance(), 0, intent, 0);
@ -364,7 +367,7 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
if (nextWakeup == null || event.end.getTimeInMillis() < nextWakeup.getTimeInMillis()) if (nextWakeup == null || event.end.getTimeInMillis() < nextWakeup.getTimeInMillis())
{ {
nextWakeup = event.end; nextWakeup = event.end;
Miscellaneous.logEvent("i", "calculateNextWakeupForCalendar()", "Choosing end of event " + event.title + " as next wakeup.", 5); Miscellaneous.logEvent("i", "calculateNextWakeupForCalendar()", "Chose end of event " + event.title + " as next wakeup.", 5);
if(!alarmHasChanged) if(!alarmHasChanged)
alarmHasChanged = true; alarmHasChanged = true;
} }
@ -374,7 +377,7 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
if (nextWakeup == null || event.start.getTimeInMillis() < nextWakeup.getTimeInMillis()) if (nextWakeup == null || event.start.getTimeInMillis() < nextWakeup.getTimeInMillis())
{ {
nextWakeup = event.start; nextWakeup = event.start;
Miscellaneous.logEvent("i", "calculateNextWakeupForCalendar()", "Choosing start of event " + event.title + " as next wakeup.", 5); Miscellaneous.logEvent("i", "calculateNextWakeupForCalendar()", "Chose start of event " + event.title + " as next wakeup.", 5);
if(!alarmHasChanged) if(!alarmHasChanged)
alarmHasChanged = true; alarmHasChanged = true;
} }