Closed Bug 833526 Opened 11 years ago Closed 11 years ago

Not be able to receive "network-active-change" notification from NetworkManager

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:leo+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18+ fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)

RESOLVED FIXED
B2G C4 (2jan on)
blocking-b2g leo+
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 + fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: stephenl, Assigned: swu)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20130116073211

Steps to reproduce:

trying to listen to “network-active-change” observer notification


Actual results:

“network-active-change” is never getting notified to the observer when switch between WiFi and cellular data network.


Expected results:

Should get “network-active-change” observer notification. Changes below work for us:

+      if(this.active != oldActive) {
+        Services.obs.notifyObservers(this.active, "network-active-changed", null);
+      }

Add the above 3 lines to be above the line 383 and line 421 below,

http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/NetworkManager.js#383
http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/NetworkManager.js#421
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Component: Networking → General
Product: Core → Boot2Gecko
Version: Trunk → unspecified
Hi Stephen,

Thanks for reporting this issue.  Please check if this patch works for you.
Assignee: nobody → swu
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #705297 - Flags: review?(vyang)
Attachment #705297 - Flags: feedback?(stephenl)
Attached patch Patch V2Splinter Review
Only notify when active network really changed.
Attachment #705297 - Attachment is obsolete: true
Attachment #705297 - Flags: review?(vyang)
Attachment #705297 - Flags: feedback?(stephenl)
Attachment #705759 - Flags: review?(vyang)
Attachment #705759 - Flags: feedback?(stephenl)
Hi Stephen,

We are waiting for your feedback before landing this patch.  Do you have any update?  Thanks.
Attachment #705759 - Flags: review?(vyang) → review+
https://hg.mozilla.org/mozilla-central/rev/2c929bc0ee9a
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
blocking-b2g: --- → leo?
blocking-b2g: leo? → leo+
https://bugzilla.mozilla.org/show_bug.cgi?id=833526 : Yes this change looks fine to me, can we get it integrated.
(I'll work with Stephen on this)
Attachment #705759 - Flags: feedback?(stephenl) → feedback+
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: