aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
diff options
context:
space:
mode:
authorDaniel Haß <mail@danielhass.de>2014-03-04 13:56:46 +0100
committerDaniel Haß <mail@danielhass.de>2014-03-04 13:56:46 +0100
commita12b67c538a1934a35c45fbed3569056a786df67 (patch)
tree173fc8fe245948398f6af8024746a5c9ec736482 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
parentd691d4c96548852c1797eff6426b378610b039d7 (diff)
downloadopen-keychain-a12b67c538a1934a35c45fbed3569056a786df67.tar.gz
open-keychain-a12b67c538a1934a35c45fbed3569056a786df67.tar.bz2
open-keychain-a12b67c538a1934a35c45fbed3569056a786df67.zip
Added exception is null option to display nothing if no error occured
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java')
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
index 06925e5fa..a6917d6f4 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
@@ -225,14 +225,16 @@ public class ImportKeysListFragment extends ListFragment implements
switch (loader.getId()) {
case LOADER_ID_BYTES:
- if(error instanceof ImportKeysListLoader.FileHasNoContent) {
+ if(error == null){
+ // No error
+ } else if(error instanceof ImportKeysListLoader.FileHasNoContent) {
AppMsg.makeText(getActivity(), R.string.error_import_file_no_content,
AppMsg.STYLE_ALERT).show();
- } else if(error instanceof ImportKeysListLoader.NonPGPPart) {
+ } else if(error instanceof ImportKeysListLoader.NonPgpPart) {
AppMsg.makeText(getActivity(),
- ((ImportKeysListLoader.NonPGPPart) error).getCount() + " " + getResources().
+ ((ImportKeysListLoader.NonPgpPart) error).getCount() + " " + getResources().
getQuantityString(R.plurals.error_import_non_pgp_part,
- ((ImportKeysListLoader.NonPGPPart) error).getCount()),
+ ((ImportKeysListLoader.NonPgpPart) error).getCount()),
new AppMsg.Style(AppMsg.LENGTH_LONG, R.color.confirm)).show();
} else {
AppMsg.makeText(getActivity(), R.string.error_generic_report_bug,