diff options
author | Arne Schwabe <arne@rfc2549.org> | 2014-02-11 23:36:48 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2014-02-11 23:36:48 +0100 |
commit | c373af42b1a75b0f23c2f0edbf196dfbb1ef0a0e (patch) | |
tree | 1a6957889611f16974de15418ef0257e9f1ba90d /src/de/blinkt/openvpn/views/FileSelectLayout.java | |
parent | 3044e321058be2a7b860a7c10c8efa49afabfcb2 (diff) |
Rework and fix config import
Diffstat (limited to 'src/de/blinkt/openvpn/views/FileSelectLayout.java')
-rw-r--r-- | src/de/blinkt/openvpn/views/FileSelectLayout.java | 10 |
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); |