Closed Bug 916032 Opened 11 years ago Closed 11 years ago

pick activity of video unable to choose file

Categories

(Firefox OS Graveyard :: Gaia::Video, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: johnhu, Assigned: johnhu)

References

Details

Attachments

(1 file)

The pick activity of video only shows videos but unable to pick one.

STR:
  1. open mms and new message
  2. create attachment and choose video
  3. tap any video
  4. there is no checkbox at the right-top corner <= error

The following message can be found at logcat:
E/GeckoConsole( 1887): [JavaScript Error: "thumbnailList is undefined" {file: "app://video.gaiamobile.org/js/video.js" line: 967}]
blocks 908380.

This is a regression bug caused by patch of bug 908380
Blocks: 908380
The root cause of this bug is that "showPickView" is called before init and thumbnailList is initialized at init function.
Attached file create object earlier.
Move the thumbnailList creation to the loading of file. So, it will always be earlier than pick activity.
Attachment #804338 - Flags: review?(dflanagan)
Assignee: nobody → johu
Comment on attachment 804338 [details]
create object earlier.

This is a simple change, and it is fine with me if you land it.

I think a better fix, however, would be to move the call to mozSetMessageHandler() into your init() function so that you don't trigger the pick until you are sufficiently initialized to handle it.

Note that you can also use navigator.mozHasPendingMessage() to find out whether you will be getting a pick activity. That way you can do different initialization depending on what it returns.  (Gallery uses mozHasPendingMessage() if you want to see an example)
Attachment #804338 - Flags: review?(dflanagan) → review+
David, 

Thanks for your suggestion. I will open another bug and start to do it. But to have pick workable, I will land it now.
No longer blocks: 908380
Depends on: 908380
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: