Deactivated unnecessary reading operations
This commit is contained in:
@@ -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.
|
||||
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())
|
||||
return START_NOT_STICKY;
|
||||
|
||||
@@ -730,7 +730,7 @@ public class Trigger
|
||||
public boolean checkCalendarEvent(CalendarReceiver.CalendarEvent event, boolean ignoreActive)
|
||||
{
|
||||
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
|
||||
@@ -747,8 +747,8 @@ public class Trigger
|
||||
11 = calendars list
|
||||
*/
|
||||
|
||||
boolean isActive = getTriggerParameter();
|
||||
if (!ignoreActive && isActive != event.isCurrentlyActive())
|
||||
boolean shouldBeActive = getTriggerParameter();
|
||||
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);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user