From 68a3dbbf3367adc66bc936bed17883c7abefc66b Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 25 Oct 2017 17:49:23 +0200 Subject: [PATCH] Start KeepAliveService after pump init. --- .../main/java/info/nightscout/androidaps/MainApp.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index cf284cacc9..3d96aa002c 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -169,19 +169,16 @@ public class MainApp extends Application { else Answers.getInstance().logCustom(new CustomEvent("AppStart")); - - startKeepAliveService(); - Thread t = new Thread(new Runnable() { @Override public void run() { SystemClock.sleep(5000); PumpInterface pump = MainApp.getConfigBuilder(); - if (pump != null) { + if (pump != null) pump.refreshDataFromPump("Initialization"); - } + startKeepAliveService(); } - }); + }, "pump-initialization"); t.start(); }