Merge remote-tracking branch 'origin/master' into development

This commit is contained in:
2021-08-14 01:55:50 +02:00
6 changed files with 21 additions and 14 deletions

View File

@ -11,8 +11,8 @@ android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
useLibrary 'org.apache.http.legacy'
versionCode 107
versionName "1.6.36"
versionCode 108
versionName "1.6.38"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -224,6 +224,19 @@ public class Rule implements Comparable<Rule>
return XmlFileInterface.writeFile();
}
public boolean cloneRule(Context context)
{
Rule newRule = new Rule();
newRule.setName(this.getName() + " - clone");
newRule.setRuleActive(this.isRuleActive());
newRule.setRuleToggle(this.isRuleToggle());
newRule.setTriggerSet(this.getTriggerSet());
newRule.setActionSet(this.getActionSet());
return newRule.create(context);
}
private boolean checkBeforeSaving(Context context, boolean changeExistingRule)
{