Merge remote-tracking branch 'origin/dev' into combo-scripter-v2

* origin/dev:
  Add SP to imports
  refactor cancelAlarm back to KeepAliveReceiver
  push next alert on read status

# Conflicts:
#	app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java
This commit is contained in:
Johannes Mockenhaupt 2017-12-19 21:18:18 +01:00
commit 0e20a148e2
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -22,6 +22,7 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.utils.LocalAlertUtils; import info.nightscout.utils.LocalAlertUtils;
import info.nightscout.utils.SP;
public class KeepAliveReceiver extends BroadcastReceiver { public class KeepAliveReceiver extends BroadcastReceiver {
private static Logger log = LoggerFactory.getLogger(KeepAliveReceiver.class); private static Logger log = LoggerFactory.getLogger(KeepAliveReceiver.class);
@ -58,7 +59,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
LocalAlertUtils.checkPumpUnreachableAlarm(lastConnection, isStatusOutdated); LocalAlertUtils.checkPumpUnreachableAlarm(lastConnection, isStatusOutdated);
if (!pump.isThisProfileSet(profile)) { if (SP.getBoolean("syncprofiletopump", false) && !pump.isThisProfileSet(profile)) {
MainApp.getConfigBuilder().getCommandQueue().setProfile(profile, null); MainApp.getConfigBuilder().getCommandQueue().setProfile(profile, null);
} else if (isStatusOutdated && !pump.isBusy()) { } else if (isStatusOutdated && !pump.isBusy()) {
MainApp.getConfigBuilder().getCommandQueue().readStatus("KeepAlive. Status outdated.", null); MainApp.getConfigBuilder().getCommandQueue().readStatus("KeepAlive. Status outdated.", null);