Bug 905685 - Don't try to load favicons from cursor in TwoLinePageRow (r=sriram)

This commit is contained in:
Lucas Rocha 2013-09-18 12:58:50 -04:00
parent 3e7c3b6317
commit 3fb56da22c

View File

@ -189,25 +189,11 @@ public class TwoLinePageRow extends LinearLayout
}
updateDisplayedUrl(url);
int faviconIndex = cursor.getColumnIndex(URLColumns.FAVICON);
Bitmap favicon = null;
if (faviconIndex != -1) {
byte[] b = cursor.getBlob(faviconIndex);
if (b != null) {
Bitmap bitmap = BitmapUtils.decodeByteArray(b);
if (bitmap != null) {
favicon = Favicons.scaleImage(bitmap);
}
}
} else {
// If favicons is not on the cursor, try to fetch it from the memory cache
favicon = Favicons.getFaviconFromMemCache(url);
}
cancelLoadFaviconTask();
// First, try to find the favicon in the memory cache. If it's not
// cached yet, try to load it from the database, off main thread.
final Bitmap favicon = Favicons.getFaviconFromMemCache(url);
if (favicon != null) {
setFaviconWithUrl(favicon, url);
} else {