Calendar trigger
This commit is contained in:
parent
8c4b75232e
commit
6e566c664d
@ -701,6 +701,7 @@ 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;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user