From a17defb817848247d72014db300aed1c81bbf906 Mon Sep 17 00:00:00 2001 From: Bart Sopers Date: Mon, 30 Dec 2019 13:32:06 -0500 Subject: [PATCH] Report implicitly cancelled tbr when deactivating pod or resetting pod state --- .../pump/omnipod/driver/comm/AapsOmnipodManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java index c077eb2d44..3fb71a671a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java @@ -217,7 +217,6 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface long time = System.currentTimeMillis(); try { delegate.deactivatePod(); - addSuccessToHistory(time, PodHistoryEntryType.DeactivatePod, null); } catch (Exception ex) { String comment = handleAndTranslateException(ex); podInitReceiver.returnInitTaskStatus(PodInitActionType.DeactivatePodWizardStep, false, comment); @@ -225,6 +224,10 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface return new PumpEnactResult().success(false).enacted(false).comment(comment); } + addSuccessToHistory(time, PodHistoryEntryType.DeactivatePod, null); + + reportImplicitlyCanceledTbr(); + podInitReceiver.returnInitTaskStatus(PodInitActionType.DeactivatePodWizardStep, true, null); OmnipodUtil.setPodSessionState(null); @@ -264,6 +267,8 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface public PumpEnactResult resetPodStatus() { delegate.resetPodState(); + reportImplicitlyCanceledTbr(); + OmnipodUtil.setPodSessionState(null); addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.ResetPodState, null);