Bug 939060 - Check URL associated with grid item before displaying favicon (r=rnewman, a=bajaj)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 20 Nov 2013 17:09:51 -0800
changeset 167523 6ce5d00f1aa8d16479020a44e75b61ab343cec8b
parent 167522 a4bb868db6fb3187833f9ffc6b84cf310b6f7f65
child 167524 8e85dacac5dec38a75f47f868028553ce6768617
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman, bajaj
bugs939060
milestone27.0a2
Bug 939060 - Check URL associated with grid item before displaying favicon (r=rnewman, a=bajaj)
mobile/android/base/home/TopSitesPage.java
--- a/mobile/android/base/home/TopSitesPage.java
+++ b/mobile/android/base/home/TopSitesPage.java
@@ -632,17 +632,19 @@ public class TopSitesPage extends HomeFr
         }
 
         public void setLoadId(int id) {
             this.loadId = id;
         }
 
         @Override
         public void onFaviconLoaded(String url, String faviconURL, Bitmap favicon) {
-            this.view.displayFavicon(favicon, faviconURL, this.loadId);
+            if (TextUtils.equals(this.view.getUrl(), url)) {
+                this.view.displayFavicon(favicon, faviconURL, this.loadId);
+            }
         }
     }
 
     private class CursorLoaderCallbacks implements LoaderCallbacks<Cursor> {
         @Override
         public Loader<Cursor> onCreateLoader(int id, Bundle args) {
             trace("Creating TopSitesLoader: " + id);
             return new TopSitesLoader(getActivity());