diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-20 21:34:21 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-20 21:34:21 +0200 |
commit | 0be790dcad21dc950e803f71185f78ed2e505985 (patch) | |
tree | 114406aa3e75efab8b112cf106da709815e079fa /OpenKeychain/src/main/java/org | |
parent | 752204d3ccc12ebe69a1ce0ae35c076a4b34e0ca (diff) | |
download | open-keychain-0be790dcad21dc950e803f71185f78ed2e505985.tar.gz open-keychain-0be790dcad21dc950e803f71185f78ed2e505985.tar.bz2 open-keychain-0be790dcad21dc950e803f71185f78ed2e505985.zip |
fix display of signed-only content
Diffstat (limited to 'OpenKeychain/src/main/java/org')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java index 1366e5563..dfe2d07aa 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java @@ -19,7 +19,6 @@ package org.sufficientlysecure.keychain.ui; import java.io.File; -import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -592,14 +591,18 @@ public class DecryptListFragment OpenPgpMetadata metadata = model.mResult.getDecryptMetadata(); - String filename = metadata.getFilename(); - if (TextUtils.isEmpty(filename)) { + String filename; + if (metadata == null) { + filename = mContext.getString(R.string.filename_unknown); + } else if (TextUtils.isEmpty(metadata.getFilename())) { filename = mContext.getString("text/plain".equals(metadata.getMimeType()) ? R.string.filename_unknown_text : R.string.filename_unknown); + } else { + filename = metadata.getFilename(); } holder.vFilename.setText(filename); - long size = metadata.getOriginalSize(); + long size = metadata == null ? 0 : metadata.getOriginalSize(); if (size == -1 || size == 0) { holder.vFilesize.setText(""); } else { |