summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-01-30 20:03:29 +0100
committerArne Schwabe <arne@rfc2549.org>2014-01-30 20:03:29 +0100
commit64abb3edff9c6791fac3c621ef014916a4033875 (patch)
tree1d2ba2a3c04a311ebcb67e8e495a458ee92379c6
parentf02f8c4899298518fde38a09212fe14f06afcd9a (diff)
Fix importing tos auth file on KitKat
--HG-- extra : rebase_source : 31bf8f5d435be2fead8b1ec98d24566d863afab8
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_Authentication.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/fragments/Settings_Authentication.java b/src/de/blinkt/openvpn/fragments/Settings_Authentication.java
index ac0d804a..b153ce4d 100644
--- a/src/de/blinkt/openvpn/fragments/Settings_Authentication.java
+++ b/src/de/blinkt/openvpn/fragments/Settings_Authentication.java
@@ -14,9 +14,12 @@ import android.preference.SwitchPreference;
import android.util.Pair;
import de.blinkt.openvpn.activities.FileSelect;
import de.blinkt.openvpn.R;
+import de.blinkt.openvpn.core.VpnStatus;
import de.blinkt.openvpn.views.RemoteCNPreference;
import de.blinkt.openvpn.VpnProfile;
+import java.io.IOException;
+
public class Settings_Authentication extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener, OnPreferenceClickListener {
private static final int SELECT_TLS_FILE = 23223232;
@@ -186,9 +189,13 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
String result = data.getStringExtra(FileSelect.RESULT_DATA);
mTlsAuthFileData=result;
setTlsAuthSummary(result);
-
- } else if (requestCode == SELECT_TLS_FILE_KITKAT && requestCode == Activity.RESULT_OK) {
-
+ } else if (requestCode == SELECT_TLS_FILE_KITKAT && resultCode == Activity.RESULT_OK) {
+ try {
+ mTlsAuthFileData= VpnProfile.INLINE_TAG + Utils.getStringFromFilePickerResult(Utils.FileType.TLS_AUTH_FILE,data,getActivity());
+ setTlsAuthSummary(mTlsAuthFileData);
+ } catch (IOException e) {
+ VpnStatus.logException(e);
+ }
}
}