diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-07-12 17:39:33 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-07-12 17:39:33 +0200 |
commit | 7a6a6c894d5318b66efbe7289d12c9d33278c750 (patch) | |
tree | 00ec62d0aff20dcbdf3d0cb14b6e081cbdfc9ab6 /src/de/blinkt/openvpn/FileSelectLayout.java | |
parent | e1359d383c16daf5440210b07d686aac5f0a2678 (diff) |
Do not show certificate information on pkcs12 and key dialogs (closes issue #180)
--HG--
extra : rebase_source : cf8d0c01621f7e22033a8a3962c4bc47983753fb
Diffstat (limited to 'src/de/blinkt/openvpn/FileSelectLayout.java')
-rw-r--r-- | src/de/blinkt/openvpn/FileSelectLayout.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/FileSelectLayout.java b/src/de/blinkt/openvpn/FileSelectLayout.java index f5a01e10..ce2f5b20 100644 --- a/src/de/blinkt/openvpn/FileSelectLayout.java +++ b/src/de/blinkt/openvpn/FileSelectLayout.java @@ -15,7 +15,8 @@ import android.widget.TextView; public class FileSelectLayout extends LinearLayout implements OnClickListener { - private TextView mDataView; + private final boolean mIsCertificate; + private TextView mDataView; private String mData; private Fragment mFragment; private int mTaskId; @@ -25,13 +26,14 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener { private boolean mShowClear; private TextView mDataDetails; - public FileSelectLayout( Context context,AttributeSet attrset) { + public FileSelectLayout( Context context, AttributeSet attrset) { super(context,attrset); inflate(getContext(), R.layout.file_select, this); - TypedArray ta = context.obtainStyledAttributes(attrset,R.styleable.FileSelectLayout); + TypedArray ta = context.obtainStyledAttributes(attrset, R.styleable.FileSelectLayout); mTitle = ta.getString(R.styleable.FileSelectLayout_title); + mIsCertificate = ta.getBoolean(R.styleable.FileSelectLayout_certificate,true); TextView tview = (TextView) findViewById(R.id.file_title); tview.setText(mTitle); @@ -76,7 +78,8 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener { mDataView.setText(R.string.inline_file_data); else mDataView.setText(data); - mDataDetails.setText(X509Utils.getCertificateFriendlyName(c,data)); + if(mIsCertificate) + mDataDetails.setText(X509Utils.getCertificateFriendlyName(c,data)); } } |