diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-10 00:13:08 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-10 00:13:08 +0200 |
commit | 2dcc54d15d5d864ba98f7d7d857cb74fa3cc5e60 (patch) | |
tree | d49d7731cceb994a3ea79a320e68a8a8c3b79aed /src/de/blinkt/openvpn/Settings_Authentication.java | |
parent | 9b87e180b4956b036917ab81e40d92804bacef8b (diff) | |
parent | e652cd62a450aa4bb284d717a1f0bd1b1d1b86a2 (diff) |
Merge
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Authentication.java')
-rw-r--r-- | src/de/blinkt/openvpn/Settings_Authentication.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/Settings_Authentication.java b/src/de/blinkt/openvpn/Settings_Authentication.java index 57d99417..6d21ca6a 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,8 @@ public class Settings_Authentication extends PreferenceFragment implements OnPre mProfile = ProfileManager.get(profileUUID); mTLSAuthFile.setOnPreferenceClickListener(this); + mCipher =(EditTextPreference) findPreference("cipher"); + loadSettings(); } @@ -59,6 +62,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 +81,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 +102,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; } |