From 3342d9daa3b9bed877761e9638d173cbfefa502b Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Tue, 19 Dec 2017 14:47:55 +0100 Subject: [PATCH] don't show single connection timeouts on the watch --- .../info/nightscout/androidaps/plugins/Wear/WearPlugin.java | 2 ++ .../main/java/info/nightscout/androidaps/queue/QueueThread.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java index 00f62bd2c0..3316d68d12 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java @@ -215,6 +215,8 @@ public class WearPlugin implements PluginBase { @Subscribe public void onStatusEvent(final EventDismissBolusprogressIfRunning ev) { + if(ev.result == null) return; + String status; if(ev.result.success){ status = MainApp.sResources.getString(R.string.success); diff --git a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java index 2c568cdccd..885d388db5 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java +++ b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java @@ -59,7 +59,7 @@ public class QueueThread extends Thread { } if (!pump.isConnected() && secondsElapsed > Constants.PUMP_MAX_CONNECTION_TIME_IN_SECONDS) { - MainApp.bus().post(new EventDismissBolusprogressIfRunning(new PumpEnactResult())); + MainApp.bus().post(new EventDismissBolusprogressIfRunning(null)); MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.connectiontimedout))); log.debug("QUEUE: timed out"); pump.stopConnecting();