Deactivated unnecessary reading operations

This commit is contained in:
2026-07-15 18:32:04 +02:00
parent 7a9e03ed4d
commit 2cb4a2f1d3
2 changed files with 5 additions and 5 deletions
@@ -277,7 +277,7 @@ public class AutomationService extends Service implements OnInitListener
/* /*
On normal phones the app is supposed to automatically restart in case of any problems. On normal phones the app is supposed to automatically restart in case of any problems.
In the emulator we want it to stop to be able to better pinpoint the root cause. In the emulator we want it to stop to be able to better pinpoint the root cause of sudden stops.
*/ */
if(Miscellaneous.isAndroidEmulator()) if(Miscellaneous.isAndroidEmulator())
return START_NOT_STICKY; return START_NOT_STICKY;
@@ -730,7 +730,7 @@ public class Trigger
public boolean checkCalendarEvent(CalendarReceiver.CalendarEvent event, boolean ignoreActive) public boolean checkCalendarEvent(CalendarReceiver.CalendarEvent event, boolean ignoreActive)
{ {
String[] conditions = this.getTriggerParameter2().split(Trigger.triggerParameter2Split); String[] conditions = this.getTriggerParameter2().split(Trigger.triggerParameter2Split);
List<CalendarReceiver.CalendarEvent> calendarEvents = CalendarReceiver.readCalendarEvents(AutomationService.getInstance(), true,false); // List<CalendarReceiver.CalendarEvent> calendarEvents = CalendarReceiver.readCalendarEvents(AutomationService.getInstance(), true,false);
/* /*
0 = titleDir 0 = titleDir
@@ -747,8 +747,8 @@ public class Trigger
11 = calendars list 11 = calendars list
*/ */
boolean isActive = getTriggerParameter(); boolean shouldBeActive = getTriggerParameter();
if (!ignoreActive && isActive != event.isCurrentlyActive()) if (!ignoreActive && shouldBeActive != event.isCurrentlyActive())
{ {
Miscellaneous.logEvent("i", "CalendarCheck", "Event " + event.title + " has to be currently active: " + String.valueOf(triggerParameter) + ", but is required otherwise.", 5); Miscellaneous.logEvent("i", "CalendarCheck", "Event " + event.title + " has to be currently active: " + String.valueOf(triggerParameter) + ", but is required otherwise.", 5);
return false; return false;