From 018d0ce011d97a31658f273ef9706122ac15cd52 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Tue, 2 Apr 2013 20:22:25 -0400 Subject: [PATCH] Bug 856728 - TopSitesView.java executes a DB cursor on the main thread r=lucasr --- mobile/android/base/widget/TopSitesView.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile/android/base/widget/TopSitesView.java b/mobile/android/base/widget/TopSitesView.java index 2dda137378ca..2cc349d0cab3 100644 --- a/mobile/android/base/widget/TopSitesView.java +++ b/mobile/android/base/widget/TopSitesView.java @@ -314,15 +314,15 @@ public class TopSitesView extends GridView { if (urls.size() == 0) return; - (new UiAsyncTask(ThreadUtils.getBackgroundHandler()) { + (new UiAsyncTask >(ThreadUtils.getBackgroundHandler()) { @Override - public Cursor doInBackground(Void... params) { - return BrowserDB.getThumbnailsForUrls(cr, urls); + public Map doInBackground(Void... params) { + return getThumbnailsFromCursor(BrowserDB.getThumbnailsForUrls(cr, urls)); } @Override - public void onPostExecute(Cursor c) { - updateTopSitesThumbnails(getThumbnailsFromCursor(c)); + public void onPostExecute(Map thumbnails) { + updateTopSitesThumbnails(thumbnails); } }).execute(); }