New version prep, fix attempt in notification listener

This commit is contained in:
2024-01-21 23:46:08 +01:00
parent b7677bdcce
commit f7ff8a38e1
18 changed files with 223 additions and 27 deletions

View File

@ -16,6 +16,7 @@ import com.google.android.gms.location.DetectedActivity;
import com.jens.automation2.receivers.ActivityDetectionReceiver;
import com.jens.automation2.receivers.BroadcastListener;
import com.jens.automation2.receivers.CalendarReceiver;
import com.jens.automation2.receivers.NotificationListener;
import java.util.ArrayList;
import java.util.Calendar;
@ -379,6 +380,11 @@ public class Rule implements Comparable<Rule>
Miscellaneous.logEvent("i", "getsGreenLight()", "Rule \"" + getName() + "\" applies and has flipped since its last execution.", 4);
return true;
}
// else if(hasTriggerOfType(Trigger.Trigger_Enum.notification) && NotificationListener.mayRuleStillBeActivatedForPendingNotifications(this))
// {
// Miscellaneous.logEvent("i", "getsGreenLight()", "Rule \"" + getName() + "\" applies, has not flipped since its last execution, but may still be executed for other notifications.", 4);
// return true;
// }
else if(hasTriggerOfType(Trigger.Trigger_Enum.calendarEvent) && CalendarReceiver.mayRuleStillBeActivatedForPendingCalendarEvents(this))
{
Miscellaneous.logEvent("i", "getsGreenLight()", "Rule \"" + getName() + "\" applies, has not flipped since its last execution, but may still be executed for other calendar events.", 4);