aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-10-26 22:49:34 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2014-10-26 22:49:34 +0100
commite1b09082904df31a8f5e101a05875ca659bc1818 (patch)
tree0e9bd46f3e90bc65090ebb1af814e5fdb637b5c4 /OpenKeychain
parent1e5797387ac4d19bc9f3d552bea9414065c3760e (diff)
downloadopen-keychain-e1b09082904df31a8f5e101a05875ca659bc1818.tar.gz
open-keychain-e1b09082904df31a8f5e101a05875ca659bc1818.tar.bz2
open-keychain-e1b09082904df31a8f5e101a05875ca659bc1818.zip
Fix crash with NotFoundException
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java
index 26c56c69a..976ce20d6 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.res.Resources;
import android.database.Cursor;
import android.database.CursorJoiner;
import android.database.MatrixCursor;
@@ -207,7 +208,7 @@ public class AppsListFragment extends ListFragment implements
null,
isInstalled(packageName),
1, // registered!
- 0 // icon is retrieved later
+ R.drawable.ic_launcher // icon is retrieved later
});
break;
}
@@ -229,7 +230,7 @@ public class AppsListFragment extends ListFragment implements
name,
isInstalled(packageName),
1, // registered!
- 0 // icon is retrieved later
+ R.drawable.ic_launcher // icon is retrieved later
});
break;
}
@@ -336,7 +337,11 @@ public class AppsListFragment extends ListFragment implements
text.setText(packageName);
} else {
text.setText(name);
- icon.setImageDrawable(getResources().getDrawable(iconResName));
+ try {
+ icon.setImageDrawable(getResources().getDrawable(iconResName));
+ } catch (Resources.NotFoundException e1) {
+ // silently fail
+ }
}
}