diff --git a/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandStartPump.kt b/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandStartPump.kt index aaed20bf7f..57e94e8d31 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandStartPump.kt +++ b/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandStartPump.kt @@ -24,9 +24,7 @@ class CommandStartPump( } else if (pump.pumpDescription.pumpType == PumpType.Insulet_Omnipod) { // When using CommandQueue.setProfile, it refuses to set the profile is the same as the current profile // However we need to set the current profile to resume delivery in case the Pod is suspended - if (profileFunction.getProfile() != null) { - pump.setNewBasalProfile(profileFunction.getProfile()) - } + pump.setNewBasalProfile(profileFunction.getProfile()) } } diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java index b4d91226ee..a7ef33c786 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java @@ -71,10 +71,11 @@ public class Notification { public static final int TIME_OR_TIMEZONE_CHANGE = 58; public static final int OMNIPOD_POD_NOT_ATTACHED = 59; public static final int CARBS_REQUIRED = 60; - public static final int IMPORTANCE_HIGH = 2; public static final int OMNIPOD_POD_SUSPENDED = 61; public static final int OMNIPOD_POD_ALERTS_UPDATED = 62; + public static final int IMPORTANCE_HIGH = 2; + public static final String CATEGORY_ALARM = "alarm"; public static final int USERMESSAGE = 1000; diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java index f8dafb3865..7c8fc6395e 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java @@ -423,7 +423,7 @@ public class AapsOmnipodManager { } catch (CommandFailedAfterChangingDeliveryStatusException ex) { String comment = getStringResource(R.string.omnipod_cancelled_old_tbr_failed_to_set_new); addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, comment); - showNotification(comment, Notification.URGENT, null); + showNotification(comment, Notification.NORMAL, null); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } catch (DeliveryStatusVerificationFailedException ex) { String comment; diff --git a/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManagerTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManagerTest.java index 26c8292bc1..66e2c0bf7a 100644 --- a/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManagerTest.java +++ b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManagerTest.java @@ -22,7 +22,8 @@ import static org.junit.Assert.assertEquals; public class AapsPodStateManagerTest { @Mock AAPSLogger aapsLogger; @Mock SP sp; - @Mock RxBusWrapper rxBus; + + private RxBusWrapper rxBus = new RxBusWrapper(); @Test public void times() {