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

* origin/dev:
  Remove missed reference to pref in NSProfilePlugin.
  Remove 'sync to profile' pref.

# Conflicts:
#	app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfilePlugin.java
This commit is contained in:
Johannes Mockenhaupt 2017-12-20 13:28:41 +01:00
commit a3db2136e1
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 10 additions and 12 deletions

View file

@ -120,7 +120,6 @@ public class NSProfilePlugin implements PluginBase, ProfileInterface {
profile = new ProfileStore(newProfile.getData()); profile = new ProfileStore(newProfile.getData());
storeNSProfile(); storeNSProfile();
MainApp.bus().post(new EventNSProfileUpdateGUI()); MainApp.bus().post(new EventNSProfileUpdateGUI());
if (SP.getBoolean(R.string.key_sync_profile_to_pump, false)) {
ConfigBuilderPlugin.getCommandQueue().setProfile(MainApp.getConfigBuilder().getProfile(), new Callback() { ConfigBuilderPlugin.getCommandQueue().setProfile(MainApp.getConfigBuilder().getProfile(), new Callback() {
@Override @Override
public void run() { public void run() {
@ -133,7 +132,6 @@ public class NSProfilePlugin implements PluginBase, ProfileInterface {
} }
}); });
} }
}
private static void storeNSProfile() { private static void storeNSProfile() {
SP.putString("profile", profile.getData().toString()); SP.putString("profile", profile.getData().toString());

View file

@ -59,7 +59,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
LocalAlertUtils.checkPumpUnreachableAlarm(lastConnection, isStatusOutdated); LocalAlertUtils.checkPumpUnreachableAlarm(lastConnection, isStatusOutdated);
if (SP.getBoolean("syncprofiletopump", false) && !pump.isThisProfileSet(profile)) { if (!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);