changle loading initial status

This commit is contained in:
Milos Kozak 2017-03-24 23:03:55 +01:00
parent b6016dc084
commit dc45d01120
3 changed files with 15 additions and 24 deletions

View file

@ -19,6 +19,7 @@ import java.util.ArrayList;
import info.nightscout.androidaps.db.DatabaseHelper;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.plugins.Actions.ActionsFragment;
import info.nightscout.androidaps.plugins.Careportal.CareportalFragment;
import info.nightscout.androidaps.plugins.CircadianPercentageProfile.CircadianPercentageProfileFragment;
@ -119,6 +120,20 @@ public class MainApp extends Application {
MainApp.getConfigBuilder().uploadAppStart();
startKeepAliveService();
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
PumpInterface pump = MainApp.getConfigBuilder();
if (pump != null)
pump.refreshDataFromPump("Initialization");
}
});
t.start();
}
private void startKeepAliveService() {

View file

@ -106,18 +106,6 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
pumpDescription.basalMinimumRate = 0.04d;
pumpDescription.isRefillingCapable = true;
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
refreshDataFromPump("Initialization");
}
});
t.start();
}
ServiceConnection mConnection = new ServiceConnection() {

View file

@ -108,18 +108,6 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
pumpDescription.basalMinimumRate = 0.1d;
pumpDescription.isRefillingCapable = true;
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
refreshDataFromPump("Initialization");
}
});
t.start();
}
ServiceConnection mConnection = new ServiceConnection() {