OSDN Git Service

Handling Resources.NotFoundException in Recents
authorMichael Jurka <mikejurka@google.com>
Thu, 7 Jul 2011 22:42:30 +0000 (15:42 -0700)
committerMichael Jurka <mikejurka@google.com>
Thu, 7 Jul 2011 22:42:35 +0000 (15:42 -0700)
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

index 408436a..6190c9b 100644 (file)
@@ -318,7 +318,11 @@ public class RecentsPanelView extends RelativeLayout
     }
 
     private Drawable getFullResIcon(Resources resources, int iconId) {
-        return resources.getDrawableForDensity(iconId, mIconDpi);
+        try {
+            return resources.getDrawableForDensity(iconId, mIconDpi);
+        } catch (Resources.NotFoundException e) {
+            return getFullResDefaultActivityIcon();
+        }
     }
 
     private Drawable getFullResIcon(ResolveInfo info, PackageManager packageManager) {