Extracting icon caching logic into a base class.
This will allow using the cache cache for other type of objects, like shortcuts and widgets. Change-Id: I38616d031cb051f93e724d9cc0e8fe9a822b9e3a
This commit is contained in:
1 parent
d65f5f7f1a
commit
0b3053c9fc
8 files changed
+639
-547
No files matched your search
@@ -66,7 +66,7 @@ public class DrawableFactory implements ResourceBasedOverride {
|
||||
* Returns a FastBitmapDrawable with the icon.
|
||||
*/
|
||||
public FastBitmapDrawable newIcon(Context context, ItemInfoWithIcon info) {
|
||||
FastBitmapDrawable drawable = info.iconBitmap == LOW_RES_ICON
|
||||
FastBitmapDrawable drawable = info.usingLowResIcon()
|
||||
? new PlaceHolderIconDrawable(info, getPreloadProgressPath(), context)
|
||||
: new FastBitmapDrawable(info);
|
||||
drawable.setIsDisabled(info.isDisabled());
|
||||
@@ -74,7 +74,7 @@ public class DrawableFactory implements ResourceBasedOverride {
|
||||
}
|
||||
|
||||
public FastBitmapDrawable newIcon(Context context, BitmapInfo info, ActivityInfo target) {
|
||||
return info.icon == LOW_RES_ICON
|
||||
return info.isLowRes()
|
||||
? new PlaceHolderIconDrawable(info, getPreloadProgressPath(), context)
|
||||
: new FastBitmapDrawable(info);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user