From f6227082f1c70f0443e0f5d6a5f10c2838e1b7ee Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 28 Sep 2021 01:24:09 +0200 Subject: Implement using compat-mode --- main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java') diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java index 0afb754d..0899dd13 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java @@ -17,7 +17,6 @@ import android.widget.AdapterView.OnItemSelectedListener; import de.blinkt.openvpn.R; import de.blinkt.openvpn.R.id; import de.blinkt.openvpn.VpnProfile; -import de.blinkt.openvpn.core.ProfileManager; import de.blinkt.openvpn.views.FileSelectLayout; public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSelectedListener, FileSelectLayout.FileSelectCallback, CompoundButton.OnCheckedChangeListener { @@ -28,6 +27,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe private FileSelectLayout mClientKey; private CheckBox mUseLzo; private Spinner mType; + private Spinner mCompatMode; private FileSelectLayout mpkcs12; private FileSelectLayout mCrlFile; private TextView mPKCS12Password; @@ -69,6 +69,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe mCrlFile = mView.findViewById(id.crlfile); mUseLzo = mView.findViewById(id.lzo); mType = mView.findViewById(id.type); + mCompatMode = mView.findViewById(id.compatmode); mPKCS12Password = mView.findViewById(id.pkcs12password); mEnablePeerFingerprint = mView.findViewById(id.enable_peer_fingerprint); mPeerFingerprints = mView.findViewById(id.peer_fingerprint); @@ -191,6 +192,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe mUseLzo.setChecked(mProfile.mUseLzo); mType.setSelection(mProfile.mAuthenticationType); + mCompatMode.setSelection(Utils.mapCompatVer(mProfile.mCompatMode)); mpkcs12.setData(mProfile.mPKCS12Filename, getActivity()); mPKCS12Password.setText(mProfile.mPKCS12Password); mUserName.setText(mProfile.mUsername); @@ -220,7 +222,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe mProfile.mAuthRetry = mAuthRetry.getSelectedItemPosition(); mProfile.mCheckPeerFingerprint = mEnablePeerFingerprint.isChecked(); mProfile.mPeerFingerPrints = mPeerFingerprints.getText().toString(); - + mProfile.mCompatMode = Utils.mapCompatMode(mCompatMode.getSelectedItemPosition()); } @Override -- cgit v1.2.3