Bug 1276050 - Remove duplicate code from Favicons r?sebastian
loadUncachedFavicon does exactly the same thing.
MozReview-Commit-ID: 58Yi28JZfv4
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
+++ b/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
@@ -288,25 +288,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