am 6c1dde4d: Merge "Applications with broken resources get default icon" into honeycomb-mr1

* commit '6c1dde4d59abc651598d9c8380c18037e8e8f715':
  Applications with broken resources get default icon
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 2e47adc..0c26bf0 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -68,11 +68,13 @@
                 com.android.internal.R.mipmap.sym_def_app_icon);
     }
 
-    public Drawable getFullResIcon(Resources resources, int iconId) {
+    public Drawable getFullResIcon(Resources resources, int iconId)
+            throws Resources.NotFoundException {
         return resources.getDrawableForDensity(iconId, mIconDpi);
     }
 
-    public Drawable getFullResIcon(ResolveInfo info, PackageManager packageManager) {
+    public Drawable getFullResIcon(ResolveInfo info, PackageManager packageManager)
+            throws Resources.NotFoundException {
         Resources resources;
         try {
             resources = packageManager.getResourcesForApplication(
@@ -174,8 +176,14 @@
             if (entry.title == null) {
                 entry.title = info.activityInfo.name;
             }
-            entry.icon = Utilities.createIconBitmap(
-                    getFullResIcon(info, mPackageManager), mContext);
+
+            Drawable icon;
+            try {
+                icon = getFullResIcon(info, mPackageManager);
+            } catch (Resources.NotFoundException e) {
+                icon = getFullResDefaultActivityIcon();
+            }
+            entry.icon = Utilities.createIconBitmap(icon, mContext);
         }
         return entry;
     }