Closed Bug 784684 Opened 13 years ago Closed 13 years ago

Sending event for volume state changed

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

Details

Attachments

(2 files)

Attached patch Sending event.Splinter Review
Volume state change currently cannot be caught by statusbar for example. The small attached patch takes the event sent from the underlying volume service and make it available.
Cool. So the only concern I have is related to OOP stuff. The volume-state-changed messages are only sent on the ParentProcess. Does the event get sent to OOP windows?
I have no idea, it's clearly out of my scope of knowledge. All I can tell you is that the matching pull request on gaia [https://github.com/mozilla-b2g/gaia/pull/3709] makes the USB Mass Storage icon visible in the status bar, so the event gets correctly caught by the statusbar.
Comment on attachment 654217 [details] [diff] [review] Sending event. (In reply to Dave Hylands [:dhylands] from comment #1) > Cool. > > So the only concern I have is related to OOP stuff. The volume-state-changed > messages are only sent on the ParentProcess. Does the event get sent to OOP > windows? I don't think we are going to run System app OOP so that shouldn't be a concern. (what would disable all the mozChromeEvent dispatching in shell.js) Can you r+ this pull request? I cannot find where the "Shared" state string come from nor what's the state actually means.
Attachment #654217 - Flags: review?(dhylands)
Or, @vingtetun can r+ this pull request ...
Assignee: nobody → lissyx+mozillians
Also, this bug is being filed as duplicate of bug 774578. The discussion and blocking status is there but the patch is here, so I am not sure which one to close...
Comment on attachment 654217 [details] [diff] [review] Sending event. Review of attachment 654217 [details] [diff] [review]: ----------------------------------------------------------------- ::: b2g/chrome/content/shell.js @@ +692,5 @@ > + shell.sendChromeEvent({ > + type: 'volume-state-changed', > + active: (aData == "Shared") > + }); > +}, "volume-state-changed", false); Nit: use single quotes everywhere in this file (even if it's ugly...)
> Can you r+ this pull request? I cannot find where the "Shared" state string > come from nor what's the state actually means. I'm not really a good person for reviewing JS stuff. In answer to your question, the Shared starts off in vold, as a number which is defined here: https://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/nsIVolume.idl#20 and then gets converted into a string here: https://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/nsVolume.cpp#26 Shared means that the sdcard is currently being shared with the PC.
Attachment #654217 - Flags: review?(dhylands) → review?(21)
Attached patch Update.Splinter Review
Addressing single-quotes issue.
ping?
So if you don't have privilege to land a bug yourself, you should add a checkin-needed to the keywords. When you create a new patch, you should obsolete the old one so it's obvious which patch needs to be landed. I can go ahead and land this for you.
(In reply to Dave Hylands [:dhylands] from comment #10) > I can go ahead and land this for you. I got it. Already landing bug 782289 for Alexandre.
https://hg.mozilla.org/integration/mozilla-inbound/rev/302dc2286ce0 (Patch was missing author info, so I accidentally pushed this under my info. Sorry.)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Seems like something we wouldn't want to regress.
blocking-basecamp: --- → +
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: