Refactoring

This commit is contained in:
2021-12-07 23:10:37 +01:00
parent 128116025f
commit b88801500f
17 changed files with 34 additions and 29 deletions

View File

@@ -201,7 +201,7 @@ public class LocationProvider
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesBySpeed();
for (Rule oneRule : ruleCandidates)
{
if ((oneRule.applies(this.getParentService()) && oneRule.hasNotAppliedSinceLastExecution()) || oneRule.isActuallyToggable())
if(oneRule.getsGreenLight(this.getParentService()))
oneRule.activate(getParentService(), false);
}
}

View File

@@ -147,7 +147,7 @@ public class WifiBroadcastReceiver extends BroadcastReceiver
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByWifiConnection();
for(Rule oneRule : ruleCandidates)
{
if((oneRule.applies(automationServiceInstance) && oneRule.hasNotAppliedSinceLastExecution()) || oneRule.isActuallyToggable())
if(oneRule.getsGreenLight(automationServiceInstance))
oneRule.activate(automationServiceInstance, false);
}
}