Prepare for separate temp basal beep config
This commit is contained in:
parent
be8a2fab75
commit
d63f34f316
1 changed files with 7 additions and 2 deletions
|
@ -288,7 +288,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
|
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
|
||||||
boolean beepsEnabled = isBasalBeepsEnabled();
|
boolean beepsEnabled = isTempBasalBeepsEnabled();
|
||||||
try {
|
try {
|
||||||
delegate.setTemporaryBasal(tempBasalPair, beepsEnabled, beepsEnabled);
|
delegate.setTemporaryBasal(tempBasalPair, beepsEnabled, beepsEnabled);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
@ -302,7 +302,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTemporaryBasal() {
|
public PumpEnactResult cancelTemporaryBasal() {
|
||||||
try {
|
try {
|
||||||
delegate.cancelTemporaryBasal(isBasalBeepsEnabled());
|
delegate.cancelTemporaryBasal(isTempBasalBeepsEnabled());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
String comment = handleAndTranslateException(ex);
|
String comment = handleAndTranslateException(ex);
|
||||||
return new PumpEnactResult().success(false).enacted(false).comment(comment);
|
return new PumpEnactResult().success(false).enacted(false).comment(comment);
|
||||||
|
@ -544,6 +544,11 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
return this.pumpStatus.beepBasalEnabled;
|
return this.pumpStatus.beepBasalEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isTempBasalBeepsEnabled() {
|
||||||
|
// TODO add separate setting for temp basal beeps
|
||||||
|
return this.pumpStatus.beepBasalEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
private String getStringResource(int id, Object... args) {
|
private String getStringResource(int id, Object... args) {
|
||||||
return MainApp.gs(id, args);
|
return MainApp.gs(id, args);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue