summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher2/IconCache.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 5c07cfb42..22691a503 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -69,13 +69,15 @@ public class IconCache {
com.android.internal.R.mipmap.sym_def_app_icon);
}
- public Drawable getFullResIcon(Resources resources, int iconId)
- throws Resources.NotFoundException {
- return resources.getDrawableForDensity(iconId, mIconDpi);
+ public Drawable getFullResIcon(Resources resources, int iconId) {
+ try {
+ return resources.getDrawableForDensity(iconId, mIconDpi);
+ } catch (Resources.NotFoundException e) {
+ return getFullResDefaultActivityIcon();
+ }
}
- public Drawable getFullResIcon(ResolveInfo info, PackageManager packageManager)
- throws Resources.NotFoundException {
+ public Drawable getFullResIcon(ResolveInfo info, PackageManager packageManager) {
Resources resources;
try {
resources = packageManager.getResourcesForApplication(
@@ -178,13 +180,8 @@ public class IconCache {
entry.title = info.activityInfo.name;
}
- Drawable icon;
- try {
- icon = getFullResIcon(info, mPackageManager);
- } catch (Resources.NotFoundException e) {
- icon = getFullResDefaultActivityIcon();
- }
- entry.icon = Utilities.createIconBitmap(icon, mContext);
+ entry.icon = Utilities.createIconBitmap(
+ getFullResIcon(info, mPackageManager), mContext);
}
return entry;
}