summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/Settings_Authentication.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-10 10:53:21 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-10 10:53:21 +0200
commit11973ef9a293ca0eaa11e760a800071042c5a7bb (patch)
treed6f1f285dc422b51dc3374138ec0fff36fd30193 /src/de/blinkt/openvpn/Settings_Authentication.java
parenta77da4c2fed8bcfe12d63b804d4f07c7fc978c9d (diff)
parentcc7f23dcefea2e255dcfe0f38031a3840288aafa (diff)
Version 0.5.2
Fix minivpn vs openvpn. (closes issue #16) If minivpn binary is already available don't write it (closes issue #15)
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Authentication.java')
-rw-r--r--src/de/blinkt/openvpn/Settings_Authentication.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/Settings_Authentication.java b/src/de/blinkt/openvpn/Settings_Authentication.java
index 57d99417..4124783b 100644
--- a/src/de/blinkt/openvpn/Settings_Authentication.java
+++ b/src/de/blinkt/openvpn/Settings_Authentication.java
@@ -24,6 +24,7 @@ public class Settings_Authentication extends PreferenceFragment implements OnPre
private ListPreference mTLSAuthDirection;
private Preference mTLSAuthFile;
private SwitchPreference mUseTLSAuth;
+ private EditTextPreference mCipher;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -45,6 +46,9 @@ public class Settings_Authentication extends PreferenceFragment implements OnPre
mProfile = ProfileManager.get(profileUUID);
mTLSAuthFile.setOnPreferenceClickListener(this);
+ mCipher =(EditTextPreference) findPreference("cipher");
+ mCipher.setOnPreferenceChangeListener(this);
+
loadSettings();
}
@@ -59,6 +63,8 @@ public class Settings_Authentication extends PreferenceFragment implements OnPre
mUseTLSAuth.setChecked(mProfile.mUseTLSAuth);
mTLSAuthFile.setSummary(mProfile.mTLSAuthFilename);
mTLSAuthDirection.setValue(mProfile.mTLSAuthDirection);
+ mCipher.setText(mProfile.mCipher);
+ onPreferenceChange(mCipher, mProfile.mCipher);
}
private void saveSettings() {
@@ -76,6 +82,12 @@ public class Settings_Authentication extends PreferenceFragment implements OnPre
mProfile.mTLSAuthDirection=null;
else
mProfile.mTLSAuthDirection = mTLSAuthDirection.getValue().toString();
+
+ if(mCipher.getText()==null)
+ mProfile.mCipher=null;
+ else
+ mProfile.mCipher = mCipher.getText();
+
}
@Override
@@ -91,6 +103,8 @@ public class Settings_Authentication extends PreferenceFragment implements OnPre
preference.setSummary(mProfile.mServerName);
else
preference.setSummary((String)newValue);
+ } else if (preference == mCipher) {
+ preference.setSummary((CharSequence) newValue);
}
return true;
}