summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/Settings_Basic.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-11 00:46:33 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-11 00:46:33 +0200
commitbfb51aa744b09b248daacd3ada8f04e6c6f7d5a5 (patch)
treeaf278c4a7243807df6cf0e7774fd7cc810f7d1a9 /src/de/blinkt/openvpn/Settings_Basic.java
parentbe5159289c41a525b718363e3f7ab78019928d42 (diff)
Rework FIle selection dialog.
Include possibility to include file content in VPN Profile. Allows safer storage of Certifcates and keys. (closes issue #13) --HG-- rename : src/com/lamerman/FileDialog.java => src/de/blinkt/openvpn/FileSelectionFragment.java
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Basic.java')
-rw-r--r--src/de/blinkt/openvpn/Settings_Basic.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/Settings_Basic.java b/src/de/blinkt/openvpn/Settings_Basic.java
index ad58a778..7586b27d 100644
--- a/src/de/blinkt/openvpn/Settings_Basic.java
+++ b/src/de/blinkt/openvpn/Settings_Basic.java
@@ -18,6 +18,7 @@ package de.blinkt.openvpn;
import java.util.HashMap;
+import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
@@ -37,7 +38,6 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.ToggleButton;
-import com.lamerman.FileDialog;
import de.blinkt.openvpn.R.id;
@@ -142,10 +142,10 @@ public class Settings_Basic extends Fragment implements View.OnClickListener, On
@Override
public void onActivityResult(int request, int result, Intent data) {
- if (request >= CHOOSE_FILE_OFFSET) {
- String filepath = data.getStringExtra(FileDialog.RESULT_PATH);
+ if (result == Activity.RESULT_OK && request >= CHOOSE_FILE_OFFSET) {
+ String filedata = data.getStringExtra(FileSelect.RESULT_DATA);
FileSelectLayout fsl = fileselects.get(request);
- fsl.setData(filepath);
+ fsl.setData(filedata);
}
savePreferences();
}