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.
|
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;
|
||||||
@@ -1243,7 +1243,7 @@ public class Trigger
|
|||||||
/*
|
/*
|
||||||
There is no easy event to tell when a tag has been disconnected again.
|
There is no easy event to tell when a tag has been disconnected again.
|
||||||
*/
|
*/
|
||||||
if(getTriggerType().equals(Trigger_Enum.nfcTag))
|
if(getTriggerType().equals(Trigger_Enum.nfcTag))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(getParentRule().getLastExecution() == null)
|
if(getParentRule().getLastExecution() == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user