fix in DateTimeTrigger management and executions when service already stopped

This commit is contained in:
jens 2022-04-03 20:25:10 +02:00
parent 0d3a13e753
commit 391edc59bf
2 changed files with 15 additions and 6 deletions

View File

@ -233,12 +233,16 @@ public class Rule implements Comparable<Rule>
} }
if(!changeExistingRule) if(!changeExistingRule)
{
for (Rule rule : Rule.ruleCollection) for (Rule rule : Rule.ruleCollection)
{
if (rule.getName().equals(this.getName())) if (rule.getName().equals(this.getName()))
{ {
Toast.makeText(context, context.getResources().getString(R.string.anotherRuleByThatName), Toast.LENGTH_LONG).show(); Toast.makeText(context, context.getResources().getString(R.string.anotherRuleByThatName), Toast.LENGTH_LONG).show();
return false; return false;
} }
}
}
if(this.getTriggerSet().size() == 0) if(this.getTriggerSet().size() == 0)
{ {

View File

@ -225,6 +225,11 @@ public class ActivityManageRule extends Activity
loadFormValuesToVariable(); loadFormValuesToVariable();
if(ruleToEdit.change(context)) if(ruleToEdit.change(context))
{ {
for(Rule r : Rule.ruleCollection)
{
r.get
}
ActivityPermissions.getRequiredPermissions(false); ActivityPermissions.getRequiredPermissions(false);
finish(); finish();
} }