Loading high resolution icons for first 3 items in a folder

> Sometimes a folder gets rearranged, without updating the model,
   like when an app in uninstalled. In that case, we need to update
   the icons for folder items, which were previously hidden

Bug: 22813360
Change-Id: I99754911c969bf2153efb2948c226c1c69219b88
This commit is contained in:
Sunny Goyal committed 2015-08-04 11:05:15 -07:00
1 parent 3f7550c1ed
commit 317698bd01
7 files changed
+46 -3

No files matched your search

+6 -2
View File
@@ -198,13 +198,17 @@ public class ShortcutInfo extends ItemInfo {
return mIcon;
}
public void updateIcon(IconCache iconCache) {
public void updateIcon(IconCache iconCache, boolean useLowRes) {
if (itemType == Favorites.ITEM_TYPE_APPLICATION) {
iconCache.getTitleAndIcon(this, promisedIntent != null ? promisedIntent : intent, user,
shouldUseLowResIcon());
useLowRes);
}
}
public void updateIcon(IconCache iconCache) {
updateIcon(iconCache, shouldUseLowResIcon());
}
@Override
void onAddToDatabase(Context context, ContentValues values) {
super.onAddToDatabase(context, values);