diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/Trigger.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/Trigger.java index 62f8bad785..2f766a14c8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/Trigger.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/Trigger.java @@ -19,7 +19,7 @@ import java.util.List; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; -public abstract class Trigger implements Cloneable { +public abstract class Trigger { public enum Comparator { IS_LOWER, @@ -139,11 +139,4 @@ public abstract class Trigger implements Cloneable { return root; } - - @Override - public Trigger clone() throws CloneNotSupportedException { - Trigger t = (Trigger) super.clone(); - t.connector = connector; // parent should already be cloned - return t; - } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerConnector.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerConnector.java index d67b0dc05c..70a4f01772 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerConnector.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerConnector.java @@ -258,17 +258,4 @@ public class TriggerConnector extends Trigger { return this; } - - - @Override - public TriggerConnector clone() throws CloneNotSupportedException { - TriggerConnector tc = (TriggerConnector) super.clone(); - tc.list = new ArrayList<>(); - for(Trigger t : list) { - tc.list.add(t.clone()); - } - if (adapter != null) - tc.adapter = new AutomationFragment.TriggerListAdapter(adapter.getContext(), adapter.getFragmentManager(), adapter.getRootLayout(), tc); - return tc; - } }