Last Comment Bug 736114 - B2G Wifi: Fire notification for signal strength changes
: B2G Wifi: Fire notification for signal strength changes
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: unspecified
: ARM Gonk (Firefox OS)
-- normal (vote)
: mozilla14
Assigned To: Blake Kaplan (:mrbkap)
: Andrew Overholt [:overholt]
Depends on:
Blocks: b2g-wifi
  Show dependency treegraph
Reported: 2012-03-15 08:54 PDT by Blake Kaplan (:mrbkap)
Modified: 2012-08-28 13:38 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v.5 (8.84 KB, patch)
2012-03-18 12:58 PDT, Blake Kaplan (:mrbkap)
no flags Details | Diff | Splinter Review
Patch v1 (11.95 KB, patch)
2012-03-19 07:21 PDT, Blake Kaplan (:mrbkap)
cjones.bugs: review+
Details | Diff | Splinter Review
Rebased (12.12 KB, patch)
2012-03-26 09:29 PDT, Blake Kaplan (:mrbkap)
mrbkap: review+
Details | Diff | Splinter Review

Description User image Blake Kaplan (:mrbkap) 2012-03-15 08:54:16 PDT
We need this to put the relative signal strength in the title bar.
Comment 1 User image Blake Kaplan (:mrbkap) 2012-03-18 12:58:47 PDT
Created attachment 607001 [details] [diff] [review]
Patch v.5

Still to do here:

- Add an API so that you don't have to wait for an event to update the status (mozWifiManager.connectionInfo, perhaps?).
- Suppress the event if nothing changed.
Comment 2 User image Blake Kaplan (:mrbkap) 2012-03-19 07:21:28 PDT
Created attachment 607150 [details] [diff] [review]
Patch v1

There is now a .connectionInformation property as well as the event. I also avoid sending the event if the signal strength hasn't changed more than 10% since the last time we checked.
Comment 3 User image Blake Kaplan (:mrbkap) 2012-03-19 07:29:35 PDT
Oh, please pretend that this was applied in the previous diff:

diff --git a/dom/wifi/nsIWifi.idl b/dom/wifi/nsIWifi.idl
index 8063aac..f06565d 100644
--- a/dom/wifi/nsIWifi.idl
+++ b/dom/wifi/nsIWifi.idl
@@ -43,7 +43,7 @@
 interface nsIWifi : nsISupports {
-[scriptable, uuid(1509221f-470e-4445-b476-88e74fd5c617)]
+[scriptable, uuid(bdc74103-85e7-4e6a-bf68-55fc35b7ad2f)]
 interface nsIDOMWifiManager : nsISupports {
      * TODO Remove in favor of a settings API.
Comment 4 User image Blake Kaplan (:mrbkap) 2012-03-25 06:16:52 PDT
Comment on attachment 607150 [details] [diff] [review]
Patch v1

If this is needed for 2.5, it needs review. Chris might have a little more time at this point than gal.
Comment 5 User image Blake Kaplan (:mrbkap) 2012-03-26 09:29:19 PDT
Created attachment 609350 [details] [diff] [review]

This is rebased and fixes a couple of dumb bugs in DOMWifiManager.js (notably where I'd switched from this._onConnection... to this._connection...).
Comment 6 User image Blake Kaplan (:mrbkap) 2012-03-26 16:31:54 PDT
(slightly tweaked to fix even more typos)

Note You need to log in before you can comment on or make changes to this bug.