Fixing issue where default widget previews were not using large icons on tablet.

Change-Id: I66469f52172be8ee526dc71cc5b6aa797f6a3289
This commit is contained in:
Winson Chung
2011-10-31 13:05:15 -07:00
parent 0ee2a43819
commit 0b9fcf5686
2 changed files with 20 additions and 5 deletions
@@ -932,7 +932,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
Bitmap preview = Bitmap.createBitmap(bitmapSize, bitmapSize, Config.ARGB_8888);
// Render the icon
Drawable icon = mIconCache.getFullResIcon(info, mPackageManager);
Drawable icon = mIconCache.getFullResIcon(info);
renderDrawableToBitmap(icon, preview, offset, offset, mAppIconSize, mAppIconSize);
return preview;
}
@@ -1014,7 +1014,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
Drawable icon = null;
int hoffset = (int) (bitmapWidth / 2 - mAppIconSize * iconScale / 2);
int yoffset = (int) (bitmapHeight / 2 - mAppIconSize * iconScale / 2);
if (info.icon > 0) icon = mPackageManager.getDrawable(packageName, info.icon, null);
if (info.icon > 0) icon = mIconCache.getFullResIcon(packageName, info.icon);
if (icon == null) icon = resources.getDrawable(R.drawable.ic_launcher_application);
renderDrawableToBitmap(icon, preview, hoffset, yoffset,