Merge pull request #916 from jotomo/ns-wifi
Disable roaming (pref) when wifi-only is enabled.
This commit is contained in:
commit
3b8ef50843
|
@ -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;
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_ns_wifionly"
|
||||
android:disableDependentsState="true"
|
||||
android:title="@string/ns_wifionly" />
|
||||
|
||||
<EditTextPreference
|
||||
|
@ -100,6 +101,7 @@
|
|||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="@string/key_ns_wifionly"
|
||||
android:key="@string/key_ns_allowroaming"
|
||||
android:title="@string/ns_allowroaming" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue