Remove clone() for Trigger
This commit is contained in:
parent
7b5c26bbb9
commit
dcb57ac11d
|
@ -19,7 +19,7 @@ import java.util.List;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
|
||||||
public abstract class Trigger implements Cloneable {
|
public abstract class Trigger {
|
||||||
|
|
||||||
public enum Comparator {
|
public enum Comparator {
|
||||||
IS_LOWER,
|
IS_LOWER,
|
||||||
|
@ -139,11 +139,4 @@ public abstract class Trigger implements Cloneable {
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Trigger clone() throws CloneNotSupportedException {
|
|
||||||
Trigger t = (Trigger) super.clone();
|
|
||||||
t.connector = connector; // parent should already be cloned
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,17 +258,4 @@ public class TriggerConnector extends Trigger {
|
||||||
|
|
||||||
return this;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue