remove unneeded call

This commit is contained in:
Milos Kozak 2017-05-26 10:31:05 +02:00
parent bb4302c02f
commit 559e07904c
8 changed files with 2 additions and 41 deletions

View file

@ -48,8 +48,5 @@ public interface PumpInterface {
// Short info for SMS, Wear etc // Short info for SMS, Wear etc
String shortStatus(boolean veryShort); String shortStatus(boolean veryShort);
// Enforced Treatment plugin
String treatmentPlugin();
boolean isFakingTempsByExtendedBoluses(); boolean isFakingTempsByExtendedBoluses();
} }

View file

@ -694,15 +694,6 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
} }
} }
@Override
public String treatmentPlugin() {
if (activePump != null) {
return activePump.treatmentPlugin();
} else {
return null;
}
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return activePump.isFakingTempsByExtendedBoluses(); return activePump.isFakingTempsByExtendedBoluses();

View file

@ -216,11 +216,6 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
this.fragmentPumpVisible = fragmentVisible; this.fragmentPumpVisible = fragmentVisible;
} }
@Override
public String treatmentPlugin() {
return TreatmentsPlugin.class.getName();
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return useExtendedBoluses; return useExtendedBoluses;

View file

@ -215,11 +215,6 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
this.fragmentPumpVisible = fragmentVisible; this.fragmentPumpVisible = fragmentVisible;
} }
@Override
public String treatmentPlugin() {
return TreatmentsPlugin.class.getName();
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return useExtendedBoluses; return useExtendedBoluses;

View file

@ -202,11 +202,6 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, ConstraintsInte
this.fragmentPumpVisible = fragmentVisible; this.fragmentPumpVisible = fragmentVisible;
} }
@Override
public String treatmentPlugin() {
return TreatmentsPlugin.class.getName();
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return false; return false;

View file

@ -117,11 +117,6 @@ public class MDIPlugin implements PluginBase, PumpInterface {
return PluginBase.PUMP; return PluginBase.PUMP;
} }
@Override
public String treatmentPlugin() {
return TreatmentsPlugin.class.getName();
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return false; return false;

View file

@ -138,11 +138,6 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
return PluginBase.PUMP; return PluginBase.PUMP;
} }
@Override
public String treatmentPlugin() {
return TreatmentsPlugin.class.getName();
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return false; return false;

View file

@ -81,8 +81,7 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
@Override @Override
public boolean isEnabled(int type) { public boolean isEnabled(int type) {
boolean canBeEnabled = MainApp.getConfigBuilder().treatmentPlugin() == null ? true : MainApp.getConfigBuilder().treatmentPlugin().equals(getClass().getName()); return type == TREATMENT && fragmentEnabled;
return type == TREATMENT && fragmentEnabled && canBeEnabled;
} }
@Override @Override
@ -102,8 +101,7 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
@Override @Override
public boolean showInList(int type) { public boolean showInList(int type) {
boolean canBeEnabled = MainApp.getConfigBuilder().treatmentPlugin() == null ? true : MainApp.getConfigBuilder().treatmentPlugin().equals(getClass().getName()); return true;
return canBeEnabled;
} }
@Override @Override