fix in DateTimeTrigger management and executions when service already stopped

pull/1/head
jens 10 months ago
parent 0d3a13e753
commit 391edc59bf

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

@ -70,7 +70,7 @@ public class ActivityManageRule extends Activity
static int triggerBattery;
static double triggerSpeed;
static double triggerNoise;
static Rule ruleToEdit;
static boolean newRule;
@ -225,6 +225,11 @@ public class ActivityManageRule extends Activity
loadFormValuesToVariable();
if(ruleToEdit.change(context))
{
for(Rule r : Rule.ruleCollection)
{
r.get
}
ActivityPermissions.getRequiredPermissions(false);
finish();
}

Loading…
Cancel
Save