Bug 812867 - Discard invalid favicon images (r=mfinkle)

This commit is contained in:
Lucas Rocha 2012-12-03 08:59:17 +00:00
parent 2a8196727f
commit 9673229f77
2 changed files with 4 additions and 2 deletions

View File

@ -705,7 +705,7 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
if (Tabs.getInstance().getSelectedTab().getState() == Tab.STATE_LOADING)
return;
if (image != null && image.getWidth() > 0 && image.getHeight() > 0) {
if (image != null) {
image = Bitmap.createScaledBitmap(image, mFaviconSize, mFaviconSize, false);
mFavicon.setImageBitmap(image);
} else {

View File

@ -296,8 +296,10 @@ public class Favicons {
image = downloadFavicon(faviconUrl);
if (image != null) {
if (image != null && image.getWidth() > 0 && image.getHeight() > 0) {
saveFaviconToDb(image);
} else {
image = null;
}
return image;