Closed
Bug 766497
Opened 14 years ago
Closed 14 years ago
wifiManager.enabled value is not "synced" across the frame
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timdream, Assigned: mrbkap)
References
Details
Attachments
(1 file)
|
12.25 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #764682 +++
STR:
1. Install latest Gaia
2. Go to Settings app, try to turn on or off wifi
3. Pull down the Utility Tray from the status bar
4. Observe the Quick Setting buttons of Wifi
Expected:
1. Each time you pull down the tray, the button will sync it's status with wifiManager.enabled. It should be either red or green depend on the same toggle button on Settings app.
Actual:
1. the button will always stay Off or On (red or green) no matter what you do. You can actually get wifiManager.connection.status = 'connected' but wifiManager.enabled = false!
PS:
The reverse does not apply since Settings app use different values to check the status of wifiManager, and you can effectively "sync" the value by kill the Settings app and launch it again.
| Assignee | ||
Comment 1•14 years ago
|
||
Getting the "multiple requests at the same time" code was tricky... I have tested this to the best of my ability, and the gaia code will have to take advantage of the new notifications itself.
With this patch, calls to setEnabled will send *two* notifications (one with the request and the event). I'm not terribly happy with that, but given that the request to setEnabled can fail, there is no better solution.
| Assignee | ||
Updated•14 years ago
|
Attachment #637436 -
Flags: review?(bent.mozilla) → review?(gal)
Comment 2•14 years ago
|
||
Comment on attachment 637436 [details] [diff] [review]
Proposed fix
Review of attachment 637436 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/wifi/WifiWorker.js
@@ +864,4 @@
>
> // Public interface of the wifi service
> manager.setWifiEnabled = function(enable, callback) {
> + if ((enable && manager.enabled) ||
enable == manager.enabled
Attachment #637436 -
Flags: review?(gal) → review+
| Assignee | ||
Comment 3•14 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ff38bb1bce5a and
http://hg.mozilla.org/mozilla-central/rev/9c6ad99de47a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 4•14 years ago
|
||
I'm getting the following in my logcat:
E/GeckoConsole( 252): [JavaScript Error: "enabled is not defined" {file: "jar:file:///system/b2g/omni.ja!/components/WifiWorker.js" line: 867}]
Should the 'enable' in this patch have been 'enabled'?
Comment 5•14 years ago
|
||
By "this patch" I mean this commit that landed: http://hg.mozilla.org/mozilla-central/rev/9c6ad99de47a
| Assignee | ||
Comment 6•14 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/155f67c2c578 fixes comment 4. Thanks for pointing it out.
You need to log in
before you can comment on or make changes to this bug.
Description
•