Compare commits

...
Author SHA1 Message Date
jens 2cb4a2f1d3 Deactivated unnecessary reading operations 2026-07-15 18:32:04 +02:00
jens 7a9e03ed4d Removed redundant space character in notification 2026-06-11 16:51:57 +02:00
2 changed files with 10 additions and 6 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.
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;
@@ -672,7 +672,11 @@ public class AutomationService extends Service implements OnInitListener
lastRuleString = instance.getResources().getString(R.string.lastRule) + " n./a.";
}
String textToDisplay = bodyText + " " + lastRuleString;
String textToDisplay;
if(bodyText.length() > 0)
textToDisplay = bodyText + " " + lastRuleString;
else
textToDisplay = lastRuleString;
if(notificationBuilder == null)
notificationBuilder = createServiceNotificationBuilder();
@@ -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;
@@ -1243,7 +1243,7 @@ public class Trigger
/*
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;
if(getParentRule().getLastExecution() == null)