diff --git a/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java b/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java index 8908b22246c0..ef3b72ad589d 100644 --- a/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java +++ b/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java @@ -17,6 +17,7 @@ import org.mozilla.gecko.db.URLMetadataTable; import org.mozilla.gecko.favicons.cache.FaviconCache; import org.mozilla.gecko.util.GeckoJarReader; import org.mozilla.gecko.util.NonEvictingLruCache; +import org.mozilla.gecko.util.StringUtils; import org.mozilla.gecko.util.ThreadUtils; import android.content.ContentResolver; @@ -629,13 +630,15 @@ public class Favicons { final BrowserDB db = GeckoProfile.get(context).getDB(); + final String metadataQueryURL = StringUtils.stripRef(url); + final ContentResolver cr = context.getContentResolver(); final Map> metadata = db.getURLMetadata().getForURLs(cr, - Collections.singletonList(url), + Collections.singletonList(metadataQueryURL), Collections.singletonList(URLMetadataTable.TOUCH_ICON_COLUMN) ); - final Map row = metadata.get(url); + final Map row = metadata.get(metadataQueryURL); String touchIconURL = null;