Closed
Bug 944225
Opened 11 years ago
Closed 11 years ago
B2G DSDS: support setting preferred network type for each sim
Categories
(Firefox OS Graveyard :: RIL, defect, P1)
Tracking
(blocking-b2g:1.3+, firefox27 wontfix, firefox28 fixed, firefox29 fixed, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)
People
(Reporter: jessica, Assigned: jessica)
References
Details
(Whiteboard: [CR 582660])
Attachments
(4 files, 9 obsolete files)
5.26 KB,
patch
|
hsinyi
:
review+
|
Details | Diff | Splinter Review |
10.83 KB,
patch
|
hsinyi
:
review+
|
Details | Diff | Splinter Review |
6.70 KB,
patch
|
hsinyi
:
review+
|
Details | Diff | Splinter Review |
1.51 KB,
patch
|
jessica
:
review+
|
Details | Diff | Splinter Review |
Currently, we use 'ril.radio.preferredNetworkType' setting key to set preferred network type. For DSDS, we need to differentiate for which sim we are setting the preferred network type.
Updated•11 years ago
|
Blocks: b2g-multi-sim
1. SIM1 can work in different mode,WCDMA / GSM
2. SIM2 only works in "GSM only" mode and can't be set preferred network.
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to sam.hua from comment #1)
> 1. SIM1 can work in different mode,WCDMA / GSM
> 2. SIM2 only works in "GSM only" mode and can't be set preferred network.
But I am not getting any error when setting preferred network type on sim2, it always return success, is this expected?
Kevin, this bug is blocking a lot of our FC test cases related to Cdma + GSM DSDS combination as we are enable to set the network type for individual SIMs. Could you please expedite this?
Flags: needinfo?(khu)
(In reply to Anshul from comment #3)
> Kevin, this bug is blocking a lot of our FC test cases related to Cdma + GSM
> DSDS combination as we are enable to set the network type for individual
> SIMs. Could you please expedite this?
Sorry typo, unable and not enable.
Updated•11 years ago
|
Severity: normal → critical
blocking-b2g: 1.3? → 1.3+
Priority: -- → P1
Whiteboard: [CR 582660]
Target Milestone: --- → 1.3 Sprint 6 - 12/6
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Is there any gaia side bug for this change? If it lands before bug 928297 I could take care of it in that bug otherwise please file the new bug and I'll take care of it as well. Thanks!
Jessica, please also provide the changes to the RILContentHelper as part of this change and I can give that a try.
Assignee | ||
Comment 10•11 years ago
|
||
nsIDOMMobileConnection and nsIMobileConnectionProvider idl.
Attachment #8341513 -
Attachment is obsolete: true
Assignee | ||
Comment 11•11 years ago
|
||
MobileConnection changes.
Attachment #8341514 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
ril implementation
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Anshul from comment #9)
> Jessica, please also provide the changes to the RILContentHelper as part of
> this change and I can give that a try.
Anshul, with the attached three patches, you will be able to use the new APIs to set/get preferred network type on a corresponding sim/service:
var conn = window.navigator.mozMobileConnections[serviceId];
conn.setPreferredNetworkType('wcdma');
Please note the patches are still in the beginning of the review process, they might change in the future.
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #8)
> Is there any gaia side bug for this change? If it lands before bug 928297 I
> could take care of it in that bug otherwise please file the new bug and I'll
> take care of it as well. Thanks!
José, I am not sure when are these patches going to be landed. I would not want to block the work in bug 928297, so what do you say we file another gaia bug for this?
Assignee | ||
Updated•11 years ago
|
Attachment #8342232 -
Flags: feedback?(htsai)
Assignee | ||
Updated•11 years ago
|
Attachment #8342233 -
Flags: feedback?(htsai)
Assignee | ||
Updated•11 years ago
|
Attachment #8342234 -
Flags: feedback?(htsai)
Comment 15•11 years ago
|
||
(In reply to Jessica Jong [:jjong] [:jessica] from comment #14)
> (In reply to José Antonio Olivera Ortega [:jaoo] from comment #8)
> > Is there any gaia side bug for this change? If it lands before bug 928297 I
> > could take care of it in that bug otherwise please file the new bug and I'll
> > take care of it as well. Thanks!
>
> José, I am not sure when are these patches going to be landed. I would not
> want to block the work in bug 928297, so what do you say we file another
> gaia bug for this?
Much better, please file the new bug at will and add me to CC list please. Thanks!
Comment 17•11 years ago
|
||
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #15)
> (In reply to Jessica Jong [:jjong] [:jessica] from comment #14)
> > (In reply to José Antonio Olivera Ortega [:jaoo] from comment #8)
> > > Is there any gaia side bug for this change? If it lands before bug 928297 I
> > > could take care of it in that bug otherwise please file the new bug and I'll
> > > take care of it as well. Thanks!
> >
> > José, I am not sure when are these patches going to be landed. I would not
> > want to block the work in bug 928297, so what do you say we file another
> > gaia bug for this?
>
> Much better, please file the new bug at will and add me to CC list please.
> Thanks!
Filed the bug 946548 for gaia support. Antonio, would you be working on this bug?
Updated•11 years ago
|
Attachment #8342232 -
Flags: feedback?(htsai) → feedback+
Updated•11 years ago
|
Attachment #8342233 -
Flags: feedback?(htsai) → feedback+
Comment 18•11 years ago
|
||
Comment on attachment 8342234 [details] [diff] [review]
Part 3: ril
Review of attachment 8342234 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you.
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +1527,5 @@
> + message.networkType = networkType;
> +
> + this.workerMessenger.send("setPreferredNetworkType", message, (function(response) {
> + if (response.success) {
> + this._preferredNetworkType = response.networkType;
Please also add:
if (DEBUG) {
this.debug("_preferredNetworkType is now " +
RIL.RIL_PREFERRED_NETWORK_TYPE_TO_GECKO[this._preferredNetworkType]);
}
@@ +1538,5 @@
> + return false;
> + }).bind(this));
> + },
> +
> + setPreferredNetworkTypeBySetting: function setPreferredNetworkTypeBySetting(value) {
I expect this is gonna removed after bug 946548 is done. Please file a follow-up gecko bug for this, and have a TODO comment. Thanks.
@@ +2541,5 @@
>
> // nsISettingsServiceCallback
> handle: function handle(aName, aResult) {
> switch(aName) {
> case "ril.radio.preferredNetworkType":
ditto.
Attachment #8342234 -
Flags: feedback?(htsai) → feedback+
Assignee | ||
Comment 21•11 years ago
|
||
Add r=hsinyi and address review comment 18.
Attachment #8342234 -
Attachment is obsolete: true
Assignee | ||
Comment 22•11 years ago
|
||
Assignee | ||
Comment 23•11 years ago
|
||
move the original test to test_mobile_preferred_network_type_by_setting.js, which has been (and still is) disabled.
Attachment #8343553 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8343548 -
Flags: review?(htsai)
Assignee | ||
Comment 24•11 years ago
|
||
Comment on attachment 8343550 [details] [diff] [review]
Part 2: dom, v2.
Olli, we are replacing the use of 'ril.radio.preferredNetworkType' with these new apis in mobileconnection. May I have your review? Thank you.
Attachment #8343550 -
Flags: review?(bugs)
Assignee | ||
Updated•11 years ago
|
Attachment #8343551 -
Flags: review?(htsai)
Assignee | ||
Updated•11 years ago
|
Attachment #8343555 -
Flags: review?(htsai)
Updated•11 years ago
|
Attachment #8343548 -
Flags: review?(htsai) → review+
Comment 25•11 years ago
|
||
Comment on attachment 8343551 [details] [diff] [review]
[Final] Part 3: ril.
Review of attachment 8343551 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
Attachment #8343551 -
Flags: review?(htsai) → review+
Comment 26•11 years ago
|
||
Comment on attachment 8343555 [details] [diff] [review]
Part 4: tests, v2.
Review of attachment 8343555 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/network/tests/marionette/manifest.ini
@@ +7,5 @@
> disabled = Bug 808783
> [test_mobile_voice_state.js]
> [test_mobile_operator_names.js]
> [test_mobile_preferred_network_type.js]
> +[test_mobile_preferred_network_type_by_setting.js]
Thanks for taking care of this :)
::: dom/network/tests/marionette/test_mobile_preferred_network_type.js
@@ +36,3 @@
>
> + request.onsuccess = function onsuccess() {
> + ok(false, "request should not success");
nit: s/success/succeed/
@@ +101,4 @@
> finish();
> }
>
> +runNextTest();
In general, I'd like to have more flexible testSetPreferredNetworkType() and testGetPreferredNetworkType() functions which take 'type' parameter. In this way, if we want to test more types, we don't need to have duplicate code.
Also, can we test all the types being mentioned in .idl?
Attachment #8343555 -
Flags: review?(htsai)
Updated•11 years ago
|
Attachment #8343550 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 27•11 years ago
|
||
Thank you Hsinyi, I have addressed review comment 26.
While testing all supported preferred network types, I found that the emulator seems not able to handle switching from "cdma/evdo" to "cdma" well, the network type is not changed in this case. I haven't looked into it yet, I just changed the network types order a little for now.
Attachment #8343555 -
Attachment is obsolete: true
Attachment #8344473 -
Flags: review?(htsai)
Comment 28•11 years ago
|
||
Comment on attachment 8344473 [details] [diff] [review]
Part 4: tests, v3.
Review of attachment 8344473 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/network/tests/marionette/test_mobile_preferred_network_type.js
@@ +81,5 @@
> +}
> +
> +function testInvalidNetworkTypes() {
> + for (let i = 0; i < invalidTypes.length; i++) {
> + failToSetPreferredNetworkType(invalidTypes[i], "InvalidParameter");
This looks okay but I'd like to be more careful that we jump to the next case while the pending request is completed for sure. So how about we follow the same style as 'testPreferredNetworkTypes'?
@@ +95,5 @@
> + 'cdma/evdo',
> + 'evdo',
> + 'cdma',
> + 'wcdma/gsm/cdma/evdo',
> + 'wcdma/gsm' // restore to default
Good! :)
Attachment #8344473 -
Flags: review?(htsai)
Assignee | ||
Comment 29•11 years ago
|
||
Thank you Hsinyi, I have addressed review comment 28. Could you help check it again? Thanks.
Attachment #8344473 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8344523 -
Flags: review?(htsai)
Comment 30•11 years ago
|
||
Comment on attachment 8344523 [details] [diff] [review]
[Final] Part 4: tests.
Review of attachment 8344523 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great, thank you :)
Attachment #8344523 -
Flags: review?(htsai) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #8343548 -
Attachment description: Part 1: idl, v2. → [Final] Part 1: idl.
Assignee | ||
Comment 31•11 years ago
|
||
Add r=smaug.
Attachment #8343550 -
Attachment is obsolete: true
Attachment #8344536 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Attachment #8343551 -
Attachment description: Part 3: ril, v2. → [Final] Part 3: ril.
Assignee | ||
Updated•11 years ago
|
Attachment #8344523 -
Attachment description: Part 4: tests, v4. → [Final] Part 4: tests.
Assignee | ||
Comment 32•11 years ago
|
||
Assignee | ||
Comment 34•11 years ago
|
||
Hi Fabrice,
This patch adds a new API to support setting preferred network type for each sim. It replaces the use of 'ril.radio.preferredNetworkType', but we are keeping the setting handler until the corresponding gaia bug (bug 946548) is landed.
To answer your questions:
- is the code fairly isolated? ("I want to refactor the RIL worker" would not pass).
yes, it's in RIL but does not touch other RIL function.
- has this code caused churn or pain before?
it's a new api, so it hasn't caused churn or pain before.
- is it easy to turn the feature off?
we can just back it out to turn it off.
- do we have good test coverage?
we have added test cases for the function.
- do we have good QA coverage, ie in smoketests?
need to wait gaia bug 946548 for QA to test.
- do we have strong partner expectations for the feature?
yes yes! QC is expecting this for their test cases.
Could you help examine and decide whether we can land this or not? Thank you.
Flags: needinfo?(fabrice)
Keywords: checkin-needed
Comment 35•11 years ago
|
||
Jessica, I won't make a decision before bug 946548 is ready. Once this is the case, can you get QA to do a smoketest with patches from both bugs and needinfo me again? thanks!
Flags: needinfo?(fabrice)
Comment 36•11 years ago
|
||
In case it's not clear, you're free to land on master, not yet on 1.3
Comment 37•11 years ago
|
||
Jessica, please land on master first. Thanks.
Assignee | ||
Comment 38•11 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #36)
> In case it's not clear, you're free to land on master, not yet on 1.3
We will land on master first. Thank you Fabrice.
Keywords: checkin-needed
Assignee | ||
Comment 39•11 years ago
|
||
Enpei, I'd like to confirm with you, do we have smoketests on setting/getting preferred network type? Thank you.
Flags: needinfo?(echu)
Comment 40•11 years ago
|
||
(In reply to Jessica Jong [:jjong] [:jessica] from comment #39)
> Enpei, I'd like to confirm with you, do we have smoketests on
> setting/getting preferred network type? Thank you.
Once the patch is landed on master build, I will arrange smoke test plus some basic setting test cases to cover it.
Flags: needinfo?(echu)
Comment 41•11 years ago
|
||
Thanks, Jessica :)
https://hg.mozilla.org/integration/b2g-inbound/rev/d5251436a70a
https://hg.mozilla.org/integration/b2g-inbound/rev/47130d04f60a
https://hg.mozilla.org/integration/b2g-inbound/rev/d9b19d9d3eab
https://hg.mozilla.org/integration/b2g-inbound/rev/6cfaf4b5a806
Keywords: checkin-needed
Comment 42•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d5251436a70a
https://hg.mozilla.org/mozilla-central/rev/47130d04f60a
https://hg.mozilla.org/mozilla-central/rev/d9b19d9d3eab
https://hg.mozilla.org/mozilla-central/rev/6cfaf4b5a806
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment 43•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/6df12b775e51
https://hg.mozilla.org/releases/mozilla-aurora/rev/6e9fa78cc96a
https://hg.mozilla.org/releases/mozilla-aurora/rev/c322e496efc6
https://hg.mozilla.org/releases/mozilla-aurora/rev/db8b2ff2ef9b
status-b2g-v1.3:
--- → fixed
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
Updated•11 years ago
|
status-b2g-v1.3T:
--- → fixed
status-b2g-v1.4:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•