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

RESOLVED FIXED in Firefox 21

Status

Firefox OS
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Stephen Li, Assigned: swu)

Tracking

unspecified
B2G C4 (2jan on)
ARM
Gonk (Firefox OS)
Bug Flags:
in-moztrap -

Firefox Tracking Flags

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

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
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
(Reporter)

Updated

5 years ago
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Component: Networking → General
Product: Core → Boot2Gecko
Version: Trunk → unspecified
(Assignee)

Comment 1

5 years ago
Created attachment 705297 [details] [diff] [review]
Patch V1: Add network-active-changed notification

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)
(Assignee)

Comment 2

5 years ago
Created attachment 705759 [details] [diff] [review]
Patch V2

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)
tracking-b2g18: --- → ?
(Assignee)

Comment 3

5 years ago
Hi Stephen,

We are waiting for your feedback before landing this patch.  Do you have any update?  Thanks.
Attachment #705759 - Flags: review?(vyang) → review+
tracking-b2g18: ? → +
https://hg.mozilla.org/mozilla-central/rev/2c929bc0ee9a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
blocking-b2g: --- → leo?
blocking-b2g: leo? → leo+
https://hg.mozilla.org/releases/mozilla-b2g18/rev/fe99594f53eb
status-b2g18: --- → fixed
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → wontfix
status-firefox19: --- → wontfix
status-firefox20: --- → wontfix
status-firefox21: --- → fixed
Target Milestone: --- → B2G C4 (2jan on)
(Reporter)

Comment 7

5 years ago
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)
(Assignee)

Updated

5 years ago
Attachment #705759 - Flags: feedback?(stephenl) → feedback+

Updated

5 years ago
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.