Calendar trigger

This commit is contained in:
Jens 2024-01-08 23:10:27 +01:00
parent 8c4b75232e
commit 6e566c664d
2 changed files with 6 additions and 7 deletions

View File

@ -700,7 +700,8 @@ public class Action
}
private void triggerUrl(Context context)
{
{
//TODO: Check if data needs to be escaped
String username = null;
String password = null;
String method = ActivityManageActionTriggerUrl.methodGet;

View File

@ -84,9 +84,11 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
@Override
public void onReceive(Context context, Intent intent)
{
Miscellaneous.logEvent("i", "CalendarReceiver", "Received " + intent.getAction(), 4);
if(intent.getAction().equalsIgnoreCase(Intent.ACTION_PROVIDER_CHANGED))
{
Miscellaneous.logEvent("i", "CalendarReceiver", "Received " + intent.getAction(), 5);
Miscellaneous.logEvent("i", "CalendarReceiver", "Clearing calendar caches.", 4);
calendarsCache = null;
calendarEventsCache = null;
@ -97,7 +99,6 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
}
else if(intent.getAction().equalsIgnoreCase(calendarAlarmAction))
{
Miscellaneous.logEvent("i", "CalendarReceiver", "Received alarm for calendar receiver.", 5);
routineAtAlarm();
}
}
@ -357,15 +358,12 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
CalendarContract.Instances.ALL_DAY,
CalendarContract.Instances.BEGIN,
CalendarContract.Instances.END,
// CalendarContract.Instances.DTSTART,
// CalendarContract.Instances.DTEND,
CalendarContract.Instances.EVENT_LOCATION,
CalendarContract.Instances.AVAILABILITY
},
null, null, null);
cursor.moveToFirst();
// fetching calendars name
String CNames[] = new String[cursor.getCount()];
Calendar now = Calendar.getInstance();
@ -499,7 +497,7 @@ public class CalendarReceiver extends BroadcastReceiver implements AutomationLis
if (events.size() == 0)
{
Miscellaneous.logEvent("i", "calculateNextWakeup()", "No future events, nothing to schedule.", 5);
Miscellaneous.logEvent("i", "calculateNextWakeup()", "No future events, nothing to schedule.", 4);
}
else
{