diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-09-26 11:16:39 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-09-26 11:16:39 +0200 |
commit | 4de7b0c3db7ae6435f7860e31b28af346fe1a79e (patch) | |
tree | a455f1846fa594d1c06524b349897d50414fa39e /src/de/blinkt/openvpn/Settings_Obscure.java | |
parent | 61e4a83c6df1abfd8ad6657d52dc57527d6038ba (diff) |
Implement reading/writing persist-tun setting
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Obscure.java')
-rw-r--r-- | src/de/blinkt/openvpn/Settings_Obscure.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/Settings_Obscure.java b/src/de/blinkt/openvpn/Settings_Obscure.java index aed61392..f7a63043 100644 --- a/src/de/blinkt/openvpn/Settings_Obscure.java +++ b/src/de/blinkt/openvpn/Settings_Obscure.java @@ -13,6 +13,7 @@ public class Settings_Obscure extends OpenVpnPreferencesFragment implements OnPr private CheckBoxPreference mUseCustomConfig; private EditTextPreference mCustomConfig; private ListPreference mLogverbosity; + private CheckBoxPreference mPersistent; @Override public void onCreate(Bundle savedInstanceState) { @@ -26,10 +27,12 @@ public class Settings_Obscure extends OpenVpnPreferencesFragment implements OnPr mUseCustomConfig = (CheckBoxPreference) findPreference("enableCustomOptions"); mCustomConfig = (EditTextPreference) findPreference("customOptions"); mLogverbosity = (ListPreference) findPreference("verblevel"); - + mPersistent = (CheckBoxPreference) findPreference("usePersistTun"); + mLogverbosity.setOnPreferenceChangeListener(this); mLogverbosity.setSummary("%s"); + loadSettings(); } @@ -39,6 +42,7 @@ public class Settings_Obscure extends OpenVpnPreferencesFragment implements OnPr mUseFloat.setChecked(mProfile.mUseFloat); mUseCustomConfig.setChecked(mProfile.mUseCustomConfig); mCustomConfig.setText(mProfile.mCustomConfigOptions); + mPersistent.setChecked(mProfile.mPersistTun); mLogverbosity.setValue(mProfile.mVerb); onPreferenceChange(mLogverbosity, mProfile.mVerb); @@ -51,6 +55,7 @@ public class Settings_Obscure extends OpenVpnPreferencesFragment implements OnPr mProfile.mUseCustomConfig = mUseCustomConfig.isChecked(); mProfile.mCustomConfigOptions = mCustomConfig.getText(); mProfile.mVerb = mLogverbosity.getValue(); + mProfile.mPersistTun = mPersistent.isChecked(); } |