Closed
Bug 823400
Opened 12 years ago
Closed 11 years ago
Wifi toggle should not write settings db twice.
Categories
(Firefox OS Graveyard :: Wifi, defect)
Tracking
(blocking-basecamp:-, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed)
People
(Reporter: vchang, Assigned: vchang)
Details
Attachments
(1 file, 1 obsolete file)
5.23 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
Currently, wifi toggle writes the settings db twice. One is in gaia, the other one is in WifiWorker.js. It confuses gaia and makes it difficult to sync the wifi status between settings(settings app) and quick settings from status bar(system app). Moreover, it should be good to write settings db frequently. Writing settings db results in flash access. It should not be a good idea to write flash frequently in the phone.
Assignee | ||
Comment 1•12 years ago
|
||
If we fail to enable wifi, ondisabled event is fired to notify settings app instead of setting wifi.enabled to false.
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #694253 -
Flags: review?(mrbkap)
Assignee | ||
Updated•12 years ago
|
blocking-basecamp: --- → ?
Comment 3•12 years ago
|
||
Comment on attachment 694253 [details] [diff] [review] Patch v1.0 Please test this well.
Attachment #694253 -
Flags: review?(mrbkap) → review+
Updated•12 years ago
|
Attachment #694253 -
Flags: feedback?(mrbkap)
Comment 4•12 years ago
|
||
Comment on attachment 694253 [details] [diff] [review] Patch v1.0 Review of attachment 694253 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/wifi/WifiWorker.js @@ +1811,5 @@ > > // Check if we need to dequeue requests first. > self._notifyAfterStateChange(false, false); > + // Notify everybody, even if they didn't ask us to come up. > + self._fireEvent("wifiDown", {}); With this change, onsupplicantlost and onsupplicantfailed only differ in the first parameter passed to _notifyAfterStateChange. Can you refactor them?
Attachment #694253 -
Flags: feedback?(mrbkap) → feedback+
Since no motivation was given for why this should block, minusing. But I'll approve the patch since it seems safe enough.
blocking-basecamp: ? → -
Comment on attachment 694253 [details] [diff] [review] Patch v1.0 [Triage Comment]
Attachment #694253 -
Flags: approval-mozilla-b2g18+
Attachment #694253 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 7•12 years ago
|
||
refactor the code based on comment 4.
Attachment #694253 -
Attachment is obsolete: true
Attachment #695443 -
Flags: review?(mrbkap)
Assignee | ||
Comment 8•12 years ago
|
||
Renominating bb+ so that we will not confuse gaia's implementation when wifi.enabled settings change event is fired.
blocking-basecamp: - → ?
Updated•12 years ago
|
blocking-basecamp: ? → +
Updated•12 years ago
|
Target Milestone: --- → B2G C3 (12dec-1jan)
Comment 9•12 years ago
|
||
Comment on attachment 695443 [details] [diff] [review] Patch v1.1 Review of attachment 695443 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Thanks.
Attachment #695443 -
Flags: review?(mrbkap) → review+
Comment 10•12 years ago
|
||
Actually, Vincent, with this patch it looks like if the supplicant dies (or wifi turns off unexpectedly) we'll now notify gaia via wifiManager.ondisabled, but nothing updates the pref. So, we should either add code here to automatically reconnect to wifi or add code to gaia to update the pref when wifi goes down. Otherwise, we'll end up in a confusing state of "it looks like wifi is up but nothing works."
Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Blake Kaplan (:mrbkap) from comment #10) > Actually, Vincent, with this patch it looks like if the supplicant dies (or > wifi turns off unexpectedly) we'll now notify gaia via > wifiManager.ondisabled, but nothing updates the pref. So, we should either > add code here to automatically reconnect to wifi or add code to gaia to > update the pref when wifi goes down. Otherwise, we'll end up in a confusing > state of "it looks like wifi is up but nothing works." You are right. But I think it should be gaia's responsibility to handle the ondisabled event and turn the settings to off. Not sure the idea of gaia people ?
Flags: needinfo?(ehung)
Vincent: Does this really need to block? It's proven non-trivial to fix this bug so we should only spend more time on it if it's absolutely necessary. Can you describe what will not work if we don't fix this bug in addition to unnecessary wear of the flash card.
blocking-basecamp: + → ?
Flags: needinfo?(vchang)
Assignee | ||
Comment 13•12 years ago
|
||
Hi Jonas, As I describe in comment 8, both gecko and gaia may toggle setttings change of "wifi.enabled", and it may confuse gaia when receiving settings change event. So I got a request to post a patch. I am fine if we don't mark it as BB+. Just gaia people may need additional code when receiving settings change which they have done in current repo. Regard Vincent
Flags: needinfo?(vchang)
Comment 14•12 years ago
|
||
given that there is a workaround, let's basecamp- this.
blocking-basecamp: ? → -
Flags: needinfo?(ehung)
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 15•11 years ago
|
||
Bug 823783 is landed, so we can land this patch without regressing anything. Marked it as checkin-needed based on the comment 5 in Bug 823783.
Comment 16•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/de0d5d8572d0
Keywords: checkin-needed
Comment 17•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/de0d5d8572d0
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 18•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/4c476f3a8570
status-b2g18:
--- → fixed
status-firefox19:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
Target Milestone: B2G C3 (12dec-1jan) → B2G C4 (2jan on)
You need to log in
before you can comment on or make changes to this bug.
Description
•