mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 856728 - TopSitesView.java executes a DB cursor on the main thread r=lucasr
This commit is contained in:
parent
f6c6af821f
commit
d95bb8a9a7
@ -314,15 +314,15 @@ public class TopSitesView extends GridView {
|
||||
if (urls.size() == 0)
|
||||
return;
|
||||
|
||||
(new UiAsyncTask<Void, Void, Cursor>(ThreadUtils.getBackgroundHandler()) {
|
||||
(new UiAsyncTask<Void, Void, Map<String, Bitmap> >(ThreadUtils.getBackgroundHandler()) {
|
||||
@Override
|
||||
public Cursor doInBackground(Void... params) {
|
||||
return BrowserDB.getThumbnailsForUrls(cr, urls);
|
||||
public Map<String, Bitmap> doInBackground(Void... params) {
|
||||
return getThumbnailsFromCursor(BrowserDB.getThumbnailsForUrls(cr, urls));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostExecute(Cursor c) {
|
||||
updateTopSitesThumbnails(getThumbnailsFromCursor(c));
|
||||
public void onPostExecute(Map<String, Bitmap> thumbnails) {
|
||||
updateTopSitesThumbnails(thumbnails);
|
||||
}
|
||||
}).execute();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user