From 896f919f374e1773e5b0298e6346ec7d7d6df3e4 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sun, 22 Apr 2018 21:43:31 +0200 Subject: [PATCH] Disable roaming (pref) when wifi-only is enabled. --- .../androidaps/plugins/NSClientInternal/NSClientPlugin.java | 2 +- app/src/main/res/xml/pref_nsclientinternal.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientPlugin.java index 004c7646f5..0525a3a9dd 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientPlugin.java @@ -135,7 +135,7 @@ public class NSClientPlugin extends PluginBase { public void onStatusEvent(final EventNetworkChange ev) { boolean wifiOnly = SP.getBoolean(R.string.key_ns_wifionly, false); String allowedSSIDs = SP.getString(R.string.key_ns_wifi_ssids, ""); - boolean allowRoaming = SP.getBoolean(R.string.key_ns_allowroaming, true); + boolean allowRoaming = SP.getBoolean(R.string.key_ns_allowroaming, true) && !wifiOnly; boolean newAllowedState = true; diff --git a/app/src/main/res/xml/pref_nsclientinternal.xml b/app/src/main/res/xml/pref_nsclientinternal.xml index 0567885a2c..3a7dc91d4b 100644 --- a/app/src/main/res/xml/pref_nsclientinternal.xml +++ b/app/src/main/res/xml/pref_nsclientinternal.xml @@ -90,6 +90,7 @@