Calendar trigger

This commit is contained in:
2024-01-10 20:01:24 +01:00
parent b38ca31df5
commit 553d14b05f
8 changed files with 72 additions and 69 deletions

View File

@@ -90,9 +90,7 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
{
Miscellaneous.logEvent("i", "CalendarReceiver", "Clearing calendar caches.", 4);
calendarsCache = null;
calendarEventsCache = null;
calendarEventsReoccurringCache = null;
clearCaches();
routineAtAlarm();
}
@@ -118,6 +116,13 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
startCalendarReceiver(automationServiceRef);
}
static void clearCaches()
{
calendarsCache = null;
calendarEventsCache = null;
calendarEventsReoccurringCache = null;
}
@Override
public void stopListener(AutomationService automationService)
{
@@ -129,9 +134,7 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
calendarReceiverInstance = null;
}
calendarsCache = null;
calendarEventsCache = null;
calendarEventsReoccurringCache = null;
clearCaches();
calendarReceiverActive = false;
}