Closed
Bug 891105
Opened 12 years ago
Closed 12 years ago
Cancel LoadThumbnailsTask when not showing the about:home
Categories
(Firefox for Android Graveyard :: Theme and Visual Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: sriram, Assigned: sriram)
References
Details
(Whiteboard: fixed-fig)
Attachments
(1 file, 2 obsolete files)
11.96 KB,
patch
|
lucasr
:
review+
|
Details | Diff | Splinter Review |
Cancel the LoadThumbnailsTask, when the user moved out of about:home.
Assignee | ||
Comment 1•12 years ago
|
||
I'm thinking of using Loaders for this.
Assignee | ||
Comment 2•12 years ago
|
||
Made the AsyncTask a AsyncTaskLoader. I'm not checking for the id on the ThumbnailsLoaderCallback as there is just one loader handled by it.
Attachment #772960 -
Flags: review?(lucasr.at.mozilla)
Assignee | ||
Comment 3•12 years ago
|
||
A missed "tab" is fixed in this.
Attachment #772960 -
Attachment is obsolete: true
Attachment #772960 -
Flags: review?(lucasr.at.mozilla)
Attachment #772962 -
Flags: review?(lucasr.at.mozilla)
Comment 4•12 years ago
|
||
Comment on attachment 772962 [details] [diff] [review]
Patch
Review of attachment 772962 [details] [diff] [review]:
-----------------------------------------------------------------
You're using a cursor in the thumbnails loader that is managed by another Loader. This is not thread-safe. You should probably create a data structure with all the data you need from cursor and use that copy in the thumbnails loader instead.
Attachment #772962 -
Flags: review?(lucasr.at.mozilla) → review-
Assignee | ||
Comment 5•12 years ago
|
||
I had the same doubt on concurrency. However, if I had to cache the cursor data (basically the url), where would I do it? Would I do it when I get the result from the CursorLoader, and pass it to ThumbnailLoader?
Comment 6•12 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #5)
> I had the same doubt on concurrency. However, if I had to cache the cursor
> data (basically the url), where would I do it? Would I do it when I get the
> result from the CursorLoader, and pass it to ThumbnailLoader?
Have a look at how FaviconsLoader does it. The thumbnails loader should be similar.
Assignee | ||
Comment 7•12 years ago
|
||
This spins a list from the cursor, passes that as an argument to load the thumbnails. This is pretty close to FaviconsLoader (but for the static methods).
Attachment #772962 -
Attachment is obsolete: true
Attachment #774351 -
Flags: review?(lucasr.at.mozilla)
Comment 8•12 years ago
|
||
Comment on attachment 774351 [details] [diff] [review]
Part 1: Thumbnail Loader
Review of attachment 774351 [details] [diff] [review]:
-----------------------------------------------------------------
Great.
::: mobile/android/base/home/BookmarksPage.java
@@ +52,5 @@
> // Key for bookmarks folder id.
> private static final String BOOKMARKS_FOLDER_KEY = "folder_id";
>
> + // Key for thumbnail urls.
> + private static final String THUMBNAILS_URL_KEY = "urls";
THUMBNAILS_URL_KEY -> THUMBNAILS_URLS_KEY
Attachment #774351 -
Flags: review?(lucasr.at.mozilla) → review+
Assignee | ||
Comment 9•12 years ago
|
||
Assignee: nobody → sriram
Whiteboard: fixed-fig
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•