Closed
Bug 784684
Opened 13 years ago
Closed 13 years ago
Sending event for volume state changed
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-basecamp:+)
RESOLVED
FIXED
| blocking-basecamp | + |
People
(Reporter: gerard-majax, Assigned: gerard-majax)
References
Details
Attachments
(2 files)
|
567 bytes,
patch
|
vingtetun
:
review+
|
Details | Diff | Splinter Review |
|
567 bytes,
patch
|
Details | Diff | 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.
Comment 1•13 years ago
|
||
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?
| Assignee | ||
Comment 2•13 years ago
|
||
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 3•13 years ago
|
||
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)
Comment 4•13 years ago
|
||
Or, @vingtetun can r+ this pull request ...
Assignee: nobody → lissyx+mozillians
Comment 5•13 years ago
|
||
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 6•13 years ago
|
||
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...)
Comment 7•13 years ago
|
||
> 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.
Updated•13 years ago
|
Attachment #654217 -
Flags: review?(dhylands) → review?(21)
| Assignee | ||
Comment 8•13 years ago
|
||
Addressing single-quotes issue.
Attachment #654217 -
Flags: review?(21) → review+
| Assignee | ||
Comment 9•13 years ago
|
||
ping?
Comment 10•13 years ago
|
||
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.
Comment 11•13 years ago
|
||
(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.
Comment 12•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/302dc2286ce0
(Patch was missing author info, so I accidentally pushed this under my info. Sorry.)
Comment 13•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 15•13 years ago
|
||
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.
Description
•