Closed
Bug 1050678
Opened 11 years ago
Closed 11 years ago
[Wifi] Send network info along with state change event: disconnected and connectingfailed
Categories
(Firefox OS Graveyard :: Wifi, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S5 (26sep)
People
(Reporter: chucklee, Assigned: chucklee)
References
Details
Attachments
(1 file, 4 obsolete files)
|
9.88 KB,
patch
|
Details | Diff | Splinter Review |
Some state change event like disconnected and connectingfailed doesn't contain network info, so app has to get network data from wifiManager.connectionInformation now.
But it doesn't contain network information, also current network info might be different from the network triggers the state change(especially disconnected and connectingfailed state).
We should revise and make sure we provided as much network info as possible with ever state change event.
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
Provide network information on each wifi state change, so Gaia can take these info to control UI more precisely.
WPS state is not included.
Attachment #8469876 -
Attachment is obsolete: true
Attachment #8475030 -
Flags: feedback?(vchang)
Attachment #8475030 -
Flags: feedback?(hchang)
Comment 3•11 years ago
|
||
Comment on attachment 8475030 [details] [diff] [review]
WIP - Provide network info for state change event.
Review of attachment 8475030 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/wifi/DOMWifiManager.js
@@ +364,4 @@
> this._connectionStatus = "disconnected";
> this._lastConnectionInfo = null;
> this._fireStatusChangeEvent();
> + this._currentNetwork = null;
Can we use msg.network directly?
Attachment #8475030 -
Flags: feedback?(vchang) → feedback+
Comment 4•11 years ago
|
||
Comment on attachment 8475030 [details] [diff] [review]
WIP - Provide network info for state change event.
Review of attachment 8475030 [details] [diff] [review]:
-----------------------------------------------------------------
The idea generally looks good to me! Thanks!
::: dom/wifi/WifiWorker.js
@@ +2004,5 @@
> if (netId) {
> WifiManager.disableNetwork(netId, function() {});
> }
> });
> + self._fireEvent("onconnectingfailed", {network: netToDOM(self.currentNetwork)});
Does it mean the original version is not working?
@@ +2050,5 @@
> self.currentNetwork.netId = this.id;
> + WifiManager.getNetworkConfiguration(self.currentNetwork, function (){
> + // Notify again because we get complete network information.
> + self._fireEvent("onconnecting", { network: netToDOM(self.currentNetwork) });
> + }.bind(self));
No need to bind |self| since the callback function doesn't use |this|.
Attachment #8475030 -
Flags: feedback?(hchang) → feedback+
| Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Henry Chang [:henry] from comment #4)
> ::: dom/wifi/WifiWorker.js
> @@ +2004,5 @@
> > if (netId) {
> > WifiManager.disableNetwork(netId, function() {});
> > }
> > });
> > + self._fireEvent("onconnectingfailed", {network: netToDOM(self.currentNetwork)});
>
> Does it mean the original version is not working?
>
Yes, but Gaia doesn't use event.network now, so it doesn't affect them now.
| Assignee | ||
Comment 6•11 years ago
|
||
Address feedback comments.
Attachment #8475030 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8476603 -
Attachment is obsolete: true
Attachment #8487748 -
Flags: review?(hchang)
Comment 8•11 years ago
|
||
Comment on attachment 8487748 [details] [diff] [review]
Provide network info for state change event.
Review of attachment 8487748 [details] [diff] [review]:
-----------------------------------------------------------------
Good patch and no concern to me. Thanks!
Attachment #8487748 -
Flags: review?(hchang) → review+
| Assignee | ||
Comment 9•11 years ago
|
||
Add reviewer's name.
Attachment #8487748 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•11 years ago
|
||
Try looks good, CPP Unit Test Fail is irrelevant because it has been failed several days and I only changes js file : https://tbpl.mozilla.org/?tree=Try&rev=826f124c7898
Keywords: checkin-needed
Comment 11•11 years ago
|
||
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S5 (26sep)
You need to log in
before you can comment on or make changes to this bug.
Description
•