diff --git a/app/src/main/java/com/jens/automation2/Action.java b/app/src/main/java/com/jens/automation2/Action.java index 0c18539..def6b93 100644 --- a/app/src/main/java/com/jens/automation2/Action.java +++ b/app/src/main/java/com/jens/automation2/Action.java @@ -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; diff --git a/app/src/main/java/com/jens/automation2/receivers/CalendarReceiver.java b/app/src/main/java/com/jens/automation2/receivers/CalendarReceiver.java index 5e331d6..0bf3fac 100644 --- a/app/src/main/java/com/jens/automation2/receivers/CalendarReceiver.java +++ b/app/src/main/java/com/jens/automation2/receivers/CalendarReceiver.java @@ -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 {