Closed
Bug 925676
Opened 11 years ago
Closed 11 years ago
B2G NetworkManager: Create RilNetworkInterface which inherits from NetworkInterface to support multiple SIM
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:1.3+, firefox28 fixed)
Tracking | Status | |
---|---|---|
firefox28 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
Details
(Whiteboard: [FT:RIL])
Attachments
(2 files, 5 obsolete files)
1.27 KB,
patch
|
edgar
:
review+
|
Details | Diff | Splinter Review |
2.07 KB,
patch
|
edgar
:
review+
|
Details | Diff | Splinter Review |
In multiple SIM scenario, when the active network is mobile, we need to this connection is from which service. The idea is adding serviceId into networkInterface, and also we can use serviceId as a index to get more information about this service.
Updated•11 years ago
|
blocking-b2g: --- → 1.3+
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → 1.3 Sprint 3 - 10/25
Assignee | ||
Comment 2•11 years ago
|
||
We have another idea for nsINetworkInterface multi-sim support rather than adding serviceId directly into it.
The idea is defining a RIL specific interface which inherits from nsINetworkInterface, then we could put all ril related attributes into it, like below,
interface nsIRilNetworkInterface: nsINetworkInterface {
// RIL specific data
};
This can avoid adding a ril specific attribute into the generic interface.
Summary: B2G NetworkManager: Add serviceId in networkInterface for multiple SIM → B2G NetworkManager: Create RILNetworkInterface which inherits from NetworkInterface to support multiple SIM
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #820234 -
Flags: feedback?(vyang)
Attachment #820234 -
Flags: feedback?(gene.lian)
Comment 4•11 years ago
|
||
Comment on attachment 820234 [details] [diff] [review]
Part 1: IDL changes, v1
Review of attachment 820234 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ +12,5 @@
> +[scriptable, uuid(a15769f1-538e-4b4b-81da-c52866d38f88)]
> +interface nsIRilNetworkInterface : nsINetworkInterface
> +{
> + readonly attribute unsigned long serviceId;
> + readonly attribute AString iccId;
Why it's not DOMString?
Attachment #820234 -
Flags: feedback?(gene.lian) → feedback+
Updated•11 years ago
|
Whiteboard: [FT:RIL]
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #4)
> Comment on attachment 820234 [details] [diff] [review]
> Part 1: IDL changes, v1
>
> Review of attachment 820234 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/system/gonk/nsIRadioInterfaceLayer.idl
> @@ +12,5 @@
> > +[scriptable, uuid(a15769f1-538e-4b4b-81da-c52866d38f88)]
> > +interface nsIRilNetworkInterface : nsINetworkInterface
> > +{
> > + readonly attribute unsigned long serviceId;
> > + readonly attribute AString iccId;
>
> Why it's not DOMString?
Yes, we should use DOMString here since other attribute in NetworkInterface is using DOMString [1], too.
Thanks
[1] http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/nsINetworkManager.idl#41
Assignee | ||
Comment 6•11 years ago
|
||
Address review comment #5.
Attachment #820234 -
Attachment is obsolete: true
Attachment #820234 -
Flags: feedback?(vyang)
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #820893 -
Flags: review?(vyang)
Attachment #820893 -
Flags: review?(gene.lian)
Assignee | ||
Updated•11 years ago
|
Attachment #820895 -
Flags: review?(vyang)
Attachment #820895 -
Flags: review?(gene.lian)
Updated•11 years ago
|
Attachment #820893 -
Flags: review?(gene.lian) → review+
Comment 8•11 years ago
|
||
Comment on attachment 820895 [details] [diff] [review]
Part 2: RIL implementation, v1
Review of attachment 820895 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +3225,5 @@
> RILNetworkInterface.prototype = {
> classID: RILNETWORKINTERFACE_CID,
> classInfo: XPCOMUtils.generateCI({classID: RILNETWORKINTERFACE_CID,
> classDescription: "RILNetworkInterface",
> + interfaces: [Ci.nsIRilNetworkInterface,
Please see below.
@@ +3230,2 @@
> Ci.nsIRILDataCallback]}),
> + QueryInterface: XPCOMUtils.generateQI([Ci.nsIRilNetworkInterface,
This won't work. Please see [1]. You have to list all the base interfaces explicitly. ;) Giving review- for now.
[1] https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/XPCOMUtils.jsm#generateQI()
@@ +3300,5 @@
> +
> + get iccId() {
> + let iccId = this.radioInterface.rilContext.iccInfo &&
> + this.radioInterface.rilContext.iccInfo.iccid;
> + return iccId;
Let's make the codes shorter:
let iccInfo = this.radioInterface.rilContext.iccInfo;
return iccInfo && iccInfo.iccid;
Attachment #820895 -
Flags: review?(vyang)
Attachment #820895 -
Flags: review?(gene.lian)
Attachment #820895 -
Flags: review-
Comment 9•11 years ago
|
||
Also, I'm wondering you have to set up RadioInterfaceLayer.manifest and call this.NSGetFactory = XPCOMUtils.generateNSGetFactory([...]).
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #8)
> Comment on attachment 820895 [details] [diff] [review]
> Part 2: RIL implementation, v1
>
> Review of attachment 820895 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/system/gonk/RadioInterfaceLayer.js
> @@ +3225,5 @@
> > RILNetworkInterface.prototype = {
> > classID: RILNETWORKINTERFACE_CID,
> > classInfo: XPCOMUtils.generateCI({classID: RILNETWORKINTERFACE_CID,
> > classDescription: "RILNetworkInterface",
> > + interfaces: [Ci.nsIRilNetworkInterface,
>
> Please see below.
>
> @@ +3230,2 @@
> > Ci.nsIRILDataCallback]}),
> > + QueryInterface: XPCOMUtils.generateQI([Ci.nsIRilNetworkInterface,
>
> This won't work. Please see [1]. You have to list all the base interfaces
> explicitly. ;) Giving review- for now.
>
> [1]
> https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/
> XPCOMUtils.jsm#generateQI()
Thank for this information. I will correct this.
>
> @@ +3300,5 @@
> > +
> > + get iccId() {
> > + let iccId = this.radioInterface.rilContext.iccInfo &&
> > + this.radioInterface.rilContext.iccInfo.iccid;
> > + return iccId;
>
> Let's make the codes shorter:
>
> let iccInfo = this.radioInterface.rilContext.iccInfo;
> return iccInfo && iccInfo.iccid;
Okay, I will modify in next version.
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #9)
> Also, I'm wondering you have to set up RadioInterfaceLayer.manifest and call
> this.NSGetFactory = XPCOMUtils.generateNSGetFactory([...]).
I think we don't need to setup manifest and call this.NSGetFactory = XPCOMUtils.generateNSGetFactory([...]), because we get the object through NetworkManager's api or observer instead of using getService(...) (Just like IccInfo, VoiceInfo ...). Please let me know if I misunderstand anything, thank you.
Updated•11 years ago
|
Summary: B2G NetworkManager: Create RILNetworkInterface which inherits from NetworkInterface to support multiple SIM → B2G NetworkManager: Create RilNetworkInterface which inherits from NetworkInterface to support multiple SIM
Comment 12•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #11)
> (In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #9)
> > Also, I'm wondering you have to set up RadioInterfaceLayer.manifest and call
> > this.NSGetFactory = XPCOMUtils.generateNSGetFactory([...]).
>
> I think we don't need to setup manifest and call this.NSGetFactory =
> XPCOMUtils.generateNSGetFactory([...]), because we get the object through
> NetworkManager's api or observer instead of using getService(...) (Just like
> IccInfo, VoiceInfo ...). Please let me know if I misunderstand anything,
> thank you.
Yes, correct. Thanks for the feedback. :)
Assignee | ||
Comment 13•11 years ago
|
||
Address review comment #8.
Attachment #820895 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #821504 -
Flags: review?(vyang)
Attachment #821504 -
Flags: review?(gene.lian)
Updated•11 years ago
|
Attachment #820893 -
Flags: review?(vyang) → review+
Updated•11 years ago
|
Attachment #821504 -
Flags: review?(vyang)
Attachment #821504 -
Flags: review?(gene.lian)
Attachment #821504 -
Flags: review+
Assignee | ||
Comment 14•11 years ago
|
||
Add r=vyang,gene after r+.
Attachment #820893 -
Attachment is obsolete: true
Attachment #821610 -
Flags: review+
Assignee | ||
Comment 15•11 years ago
|
||
Add r=vyang after r+.
Attachment #821504 -
Attachment is obsolete: true
Attachment #821612 -
Flags: review+
Assignee | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #15)
> Created attachment 821612 [details] [diff] [review]
> Part 2: RIL implementation, v2, r=vyang
>
> Add r=vyang after r+.
r=gene as well, please. :)
Assignee | ||
Comment 18•11 years ago
|
||
Add r=gene :)
Attachment #821612 -
Attachment is obsolete: true
Attachment #821623 -
Flags: review+
Assignee | ||
Comment 19•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #16)
> try server: https://tbpl.mozilla.org/?tree=Try&rev=3f28cb26bc49
Got one error:
19:59:27 INFO - TEST-START test_icc_contact.js
20:00:28 INFO - /home/cltbld/talos-slave/test/build/tests/marionette/tests/dom/icc/tests/marionette/test_icc_contact.js, runTest (marionette_test.MarionetteJSTestCase) ... ERROR
Log:
20:02:25 WARNING - 10-24 22:52:35.328 45 45 E GeckoConsole: [JavaScript Error: "'toJSON' called on an object that does not implement interface mozContact." {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 1467}]
This icc_contact failed is not related to this patch, but bug 928782.
It is safe to land this.
Assignee | ||
Comment 20•11 years ago
|
||
Comment 21•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/48aebf562dcc
https://hg.mozilla.org/mozilla-central/rev/c33d3181d2c5
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
status-firefox28:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•