mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Fix NPE when getting app icons
Change-Id: I04c171424006d90321c707d124211f007159c774
This commit is contained in:
@@ -69,11 +69,14 @@ public class IconCache {
|
||||
}
|
||||
|
||||
public Drawable getFullResIcon(Resources resources, int iconId) {
|
||||
Drawable d;
|
||||
try {
|
||||
return resources.getDrawableForDensity(iconId, mIconDpi);
|
||||
d = resources.getDrawableForDensity(iconId, mIconDpi);
|
||||
} catch (Resources.NotFoundException e) {
|
||||
return getFullResDefaultActivityIcon();
|
||||
d = null;
|
||||
}
|
||||
|
||||
return (d != null) ? d : getFullResDefaultActivityIcon();
|
||||
}
|
||||
|
||||
public Drawable getFullResIcon(ResolveInfo info, PackageManager packageManager) {
|
||||
|
||||
Reference in New Issue
Block a user