mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Bug 714148 - Check whether favicon images are decoded successfully. r=mfinkle
This commit is contained in:
parent
9a46933b03
commit
7f5979a559
@ -263,11 +263,13 @@ public class ProfileMigrator {
|
||||
protected void addFavicon(String url, String mime, byte[] data) {
|
||||
ByteArrayInputStream byteStream = new ByteArrayInputStream(data);
|
||||
BitmapDrawable image = (BitmapDrawable) Drawable.createFromStream(byteStream, "src");
|
||||
try {
|
||||
BrowserDB.updateFaviconForUrl(mCr, url, image);
|
||||
} catch (SQLiteException e) {
|
||||
Log.i(LOGTAG, "Migrating favicon failed: " + mime + " URL: " + url
|
||||
+ " error:" + e.getMessage());
|
||||
if (image != null) {
|
||||
try {
|
||||
BrowserDB.updateFaviconForUrl(mCr, url, image);
|
||||
} catch (SQLiteException e) {
|
||||
Log.i(LOGTAG, "Migrating favicon failed: " + mime + " URL: " + url
|
||||
+ " error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user