Bug 1276050 - Remove duplicate code from Favicons r=sebastian
authorAndrzej Hunt <ahunt@mozilla.com>
Mon, 23 May 2016 13:27:26 -0700
changeset 338902 9575e608cabe6f7ed7cf73475558ddbe9938bf9b
parent 338901 4ecfc31fd9bddd906532482338273b752a37cf12
child 338903 93325fc7131cb36584c85641132090ca8ba40cdd
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1276050
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276050 - Remove duplicate code from Favicons r=sebastian loadUncachedFavicon does exactly the same thing. MozReview-Commit-ID: 58Yi28JZfv4
mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
+++ b/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
@@ -301,25 +301,17 @@ public class Favicons {
             final Bitmap result = getSizedFaviconFromCache(targetURL, targetSize);
             if (result != null) {
                 // Victory - immediate response!
                 return dispatchResult(pageURL, targetURL, result, callback);
             }
         }
 
         // No joy using in-memory resources. Go to background thread and ask the database.
-        final LoadFaviconTask task =
-            new LoadFaviconTask(context, pageURL, targetURL, 0, callback, targetSize, true);
-        final int taskId = task.getId();
-        synchronized (loadTasks) {
-            loadTasks.put(taskId, task);
-        }
-        task.execute();
-
-        return taskId;
+        return loadUncachedFavicon(context, pageURL, targetURL, 0, targetSize, callback);
     }
 
     public static int getSizedFaviconForPageFromLocal(Context context, final String pageURL, final OnFaviconLoadedListener callback) {
         return getSizedFaviconForPageFromLocal(context, pageURL, defaultFaviconSize, callback);
     }
 
     /**
      * Helper method to determine the URL of the Favicon image for a given page URL by querying the