Bug 877870 - Use favicon mem cache as fallback in TwoLinePageRow (r=sriram)
authorLucas Rocha <lucasr@mozilla.com>
Tue, 11 Jun 2013 17:57:44 +0100
changeset 151298 33236a7d3ef52eef0ff8e886fb85f9cb12bc9543
parent 151297 06bd6a21602252a120e4c9504513d8df296d4baf
child 151299 dc61bbe74149dcd4d860481ac118707cd8ac7fc5
push idunknown
push userunknown
push dateunknown
reviewerssriram
bugs877870
milestone24.0a1
Bug 877870 - Use favicon mem cache as fallback in TwoLinePageRow (r=sriram)
mobile/android/base/home/TwoLinePageRow.java
--- a/mobile/android/base/home/TwoLinePageRow.java
+++ b/mobile/android/base/home/TwoLinePageRow.java
@@ -98,11 +98,14 @@ public class TwoLinePageRow extends Line
             if (b != null) {
                 Bitmap bitmap = BitmapUtils.decodeByteArray(b);
                 if (bitmap != null) {
                     favicon = Favicons.getInstance().scaleImage(bitmap);
                 }
             }
 
             setFaviconWithUrl(favicon, url);
+        } else {
+            // If favicons is not on the cursor, try to fetch it from the memory cache
+            setFaviconWithUrl(Favicons.getInstance().getFaviconFromMemCache(url), url);
         }
     }
 }