summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/views/FileSelectLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt/openvpn/views/FileSelectLayout.java')
-rw-r--r--src/de/blinkt/openvpn/views/FileSelectLayout.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/views/FileSelectLayout.java b/src/de/blinkt/openvpn/views/FileSelectLayout.java
index 04392b47..362777e4 100644
--- a/src/de/blinkt/openvpn/views/FileSelectLayout.java
+++ b/src/de/blinkt/openvpn/views/FileSelectLayout.java
@@ -29,9 +29,9 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener {
setData(fileData, c);
} else if (data != null) {
try {
- String newData = Utils.getStringFromFilePickerResult(fileType,data,c);
+ String newData = Utils.getFilePickerResult(fileType, data, c);
if (newData!=null)
- setData(VpnProfile.INLINE_TAG + newData, c);
+ setData(newData, c);
} catch (IOException e) {
VpnStatus.logException(e);
@@ -119,10 +119,12 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener {
public void setData(String data, Context c) {
mData = data;
if (data == null) {
- mDataView.setText(mFragment.getString(R.string.no_data));
+ mDataView.setText(c.getString(R.string.no_data));
mDataDetails.setText("");
} else {
- if (mData.startsWith(VpnProfile.INLINE_TAG))
+ if (mData.startsWith(VpnProfile.DISPLAYNAME_TAG)) {
+ mDataView.setText(c.getString(R.string.imported_from_file, VpnProfile.getDisplayName(mData)));
+ } else if (mData.startsWith(VpnProfile.INLINE_TAG))
mDataView.setText(R.string.inline_file_data);
else
mDataView.setText(data);