avoid ConcurrentModificationException
This commit is contained in:
parent
68faba8951
commit
3f561943dc
1 changed files with 3 additions and 1 deletions
|
@ -193,7 +193,9 @@ class AutomationPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
aapsLogger.debug(LTag.AUTOMATION, "processActions")
|
aapsLogger.debug(LTag.AUTOMATION, "processActions")
|
||||||
for (event in automationEvents) {
|
val iterator = automationEvents.iterator()
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
val event = iterator.next()
|
||||||
if (event.isEnabled && event.shouldRun() && event.trigger.shouldRun() && event.getPreconditions().shouldRun()) {
|
if (event.isEnabled && event.shouldRun() && event.trigger.shouldRun() && event.getPreconditions().shouldRun()) {
|
||||||
if (event.systemAction || userEventsEnabled) {
|
if (event.systemAction || userEventsEnabled) {
|
||||||
val actions = event.actions
|
val actions = event.actions
|
||||||
|
|
Loading…
Reference in a new issue