Closed
Bug 891707
Opened 11 years ago
Closed 9 years ago
B2G Emulator: update voice registration after switching radio technology
Categories
(Firefox OS Graveyard :: Emulator, defect)
Tracking
(firefox42 fixed)
RESOLVED
FIXED
FxOS-S4 (07Aug)
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: edgar, Assigned: bhsu)
References
Details
Attachments
(5 files, 10 obsolete files)
(deleted),
patch
|
aknow
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
aknow
:
review+
|
Details | Diff | Splinter Review |
(deleted),
text/x-github-pull-request
|
edgar
:
review+
|
Details |
(deleted),
text/x-github-pull-request
|
edgar
:
review+
|
Details |
(deleted),
patch
|
bhsu
:
review+
|
Details | Diff | Splinter Review |
In bug 876396, we add a console command, 'modem tech', to switch radio technology. So that we can use this command to switch emulator to cdma mode and run test cases.
But when I try to write a marionette tests, I meet some problems as below:
- Currently the preferred Network Type is GSM/WCDMA, so it is failed to switch to cdma by using 'modem tech' console command.
To fix this, maybe we could consider to make 'modem tech' can also support switching preferred network type.
- There is no way to know the radio switching process is finished. If we start test before it is ready, we may got some unexpected timing issue. My idea is using voice registration event [1], when radio technology changes, qemu should report voice registration change with the current radio technology [2]. But this mechanism seems not work properly now.
[1] https://github.com/mozilla-b2g/platform_hardware_ril/blob/master/include/telephony/ril.h#L3354
[2] https://github.com/mozilla-b2g/platform_hardware_ril/blob/master/include/telephony/ril.h#L1248
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Reporter | ||
Comment 3•11 years ago
|
||
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #0)
> - Currently the preferred Network Type is GSM/WCDMA, so it is failed to
> switch to cdma by using 'modem tech' console command.
> To fix this, maybe we could consider to make 'modem tech' can also support
> switching preferred network type.
File a separated bug for this.
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #4)
> (In reply to Edgar Chen [:edgar][:echen] from comment #0)
> > - Currently the preferred Network Type is GSM/WCDMA, so it is failed to
> > switch to cdma by using 'modem tech' console command.
> > To fix this, maybe we could consider to make 'modem tech' can also support
> > switching preferred network type.
> File a separated bug for this.
Bug 897015. Thanks
Comment 6•11 years ago
|
||
Do you think these PRs are ready? Looks good for me.
Reporter | ||
Comment 7•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #6)
> Do you think these PRs are ready? Looks good for me.
It is almost ready, but I would like to do more test before request review.
Thanks.
Reporter | ||
Comment 8•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #7)
> (In reply to Vicamo Yang [:vicamo][:vyang] from comment #6)
> > Do you think these PRs are ready? Looks good for me.
>
> It is almost ready, but I would like to do more test before request review.
> Thanks.
I found voice registration does not update correctly if the switch event is triggered by setting preferred network type from gecko.
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #8)
> (In reply to Edgar Chen [:edgar][:echen] from comment #7)
> > (In reply to Vicamo Yang [:vicamo][:vyang] from comment #6)
> > > Do you think these PRs are ready? Looks good for me.
> >
> > It is almost ready, but I would like to do more test before request review.
> > Thanks.
>
> I found voice registration does not update correctly if the switch event is
> triggered by setting preferred network type from gecko.
Provide the solution in part1 patch of qemu pull request.
Reporter | ||
Updated•11 years ago
|
Attachment #774441 -
Flags: review?(vyang)
Reporter | ||
Updated•11 years ago
|
Attachment #774450 -
Flags: review?(vyang)
Updated•11 years ago
|
Attachment #774441 -
Flags: review?(vyang) → review+
Reporter | ||
Updated•11 years ago
|
Attachment #774450 -
Flags: review?(vyang)
Updated•11 years ago
|
Blocks: b2g-emulator
Updated•11 years ago
|
Component: General → Emulator
Reporter | ||
Comment 10•11 years ago
|
||
Attachment #774441 -
Attachment is obsolete: true
Reporter | ||
Comment 11•11 years ago
|
||
Attachment #774450 -
Attachment is obsolete: true
Assignee | ||
Comment 12•10 years ago
|
||
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8612674 -
Attachment is obsolete: true
Attachment #8617776 -
Flags: review?(szchen)
Assignee | ||
Comment 14•9 years ago
|
||
Attachment #8617777 -
Flags: review?(szchen)
Comment 15•9 years ago
|
||
Comment on attachment 8617776 [details] [diff] [review]
Part 1: Waiting for |UNSOLICITED_RESPONSE_VOICE_NETWORK_STATE_CHANGED| when changing modem tech
Review of attachment 8617776 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/telephony/test/marionette/head.js
@@ +281,5 @@
> */
> function changeModemTech(aTech, aPreferredMask) {
> + let mobileConn = navigator.mozMobileConnections[0];
> +
> + function checkTech(aMobileConnection) {
Use closure for both |mobileConn| and |aTech| or passing them as function parameters.
Let's apply the same way for these two variables.
@@ +282,5 @@
> function changeModemTech(aTech, aPreferredMask) {
> + let mobileConn = navigator.mozMobileConnections[0];
> +
> + function checkTech(aMobileConnection) {
> + switch(mobileConn.voice.type) {
not |mobileConn|, should be |aMobileConnection|
@@ +314,5 @@
> + return false;
> + }
> + }
> +
> + let promise1 = checkTech(mobileConn) ? Promise.resolve()
The naming of checkTech is not good enough. By reading the line
let promise1 = checkTech(mobileConn) ...
You have no idea what will be done in the function.
The function mixed two purposes, one is converting voice type to tech, another one is comparing the tech. I'll suggest something like
function voiceTypeToTech(aType) {
case "...":
return "gsm";
...
}
function isCompleted() {
return aTech === voiceTypeToTech(mobileConn.voice.type);
}
Attachment #8617776 -
Flags: review?(szchen) → review-
Updated•9 years ago
|
Attachment #8617777 -
Flags: review?(szchen) → review+
Assignee | ||
Comment 16•9 years ago
|
||
Attachment #8617776 -
Attachment is obsolete: true
Attachment #8622180 -
Flags: review?(szchen)
Comment 17•9 years ago
|
||
Comment on attachment 8622180 [details] [diff] [review]
Part 1: Waiting for |UNSOLICITED_RESPONSE_VOICE_NETWORK_STATE_CHANGED| when changing modem tech (V2). r=aknow
Review of attachment 8622180 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/telephony/test/marionette/head.js
@@ +277,5 @@
> }
>
> /**
> + * @param aVoiceType
> + * The voice type of a mobileConnection, which can be obtained from
This line is too long.
Attachment #8622180 -
Flags: review?(szchen) → review+
Assignee | ||
Comment 18•9 years ago
|
||
Hi Edgar,
Can you help review these patches? They are made from simply rebasing previous works.
Attachment #8342282 -
Attachment is obsolete: true
Attachment #8624053 -
Flags: review?(echen)
Assignee | ||
Comment 19•9 years ago
|
||
Attachment #8342284 -
Attachment is obsolete: true
Attachment #8624054 -
Flags: review?(echen)
Assignee | ||
Comment 20•9 years ago
|
||
Attachment #8628142 -
Flags: review?(echen)
Assignee | ||
Comment 21•9 years ago
|
||
Attachment #8628143 -
Flags: review?(echen)
Reporter | ||
Comment 22•9 years ago
|
||
Since you are working on this bug now, I change the assignee to you. Thank you, Ben.
Assignee: echen → bhsu
Comment hidden (obsolete) |
Reporter | ||
Updated•9 years ago
|
Attachment #8624054 -
Attachment mime type: text/plain → text/x-github-pull-request
Reporter | ||
Comment 24•9 years ago
|
||
Comment on attachment 8624054 [details]
[external/qemu] pull request 150 (for Emulator-KK)
The link of pull request seems incorrect.
Attachment #8624054 -
Flags: review?(echen)
Reporter | ||
Comment 25•9 years ago
|
||
Comment on attachment 8628143 [details]
[external/qemu] pull request 149 (for Emulator-ICS)
Sorry for being late. Per comments on github, could you please file a follow-up bug to find a better solution for the registration state. Thank you.
Attachment #8628143 -
Flags: review?(echen) → review+
Reporter | ||
Comment 26•9 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #23)
> Comment on attachment 8628142 [details]
> [hardware/ril] pull request 60 (for Emulator-ICS)
>
> Sorry for being late. Per comments on github, could you please file a
> follow-up bug to find a better solution for the registration state. Thank
> you.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(Please ignore my previous comment, It should belong to the pull request of external/qemu. :P)
r=me with comments on github addressed. Thank you.
Assignee | ||
Comment 27•9 years ago
|
||
Link updated :P
Attachment #8624054 -
Attachment is obsolete: true
Attachment #8640887 -
Flags: review?(echen)
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 28•9 years ago
|
||
Since there are some defects in current gecko, some of the test will fail after applying other patches for this issue. As a result, I suggest first disable some test here, and re-enable them in Bug 1190274.
Attachment #8642270 -
Flags: review?(echen)
Reporter | ||
Comment 29•9 years ago
|
||
Comment on attachment 8642270 [details] [diff] [review]
Part 3: Disable some tests
Review of attachment 8642270 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with comment addressed, thank you.
::: dom/mobileconnection/tests/marionette/test_mobile_voice_state.js
@@ -125,5 @@
>
> startTestCommon(function() {
> log("Test initial voice connection info");
>
> - verifyVoiceInfo(INITIAL_STATES);
Please also remove |INITIAL_STATES|.
Attachment #8642270 -
Flags: review?(echen) → review+
Assignee | ||
Comment 30•9 years ago
|
||
Attachment #8642270 -
Attachment is obsolete: true
Attachment #8642923 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8617777 -
Attachment description: Part 2: Enable a testcase → Part 2: Enable a testcase. r=aknow
Assignee | ||
Updated•9 years ago
|
Attachment #8622180 -
Attachment description: Part 1: Waiting for |UNSOLICITED_RESPONSE_VOICE_NETWORK_STATE_CHANGED| when changing modem tech (V2) → Part 1: Waiting for |UNSOLICITED_RESPONSE_VOICE_NETWORK_STATE_CHANGED| when changing modem tech (V2). r=aknow
Assignee | ||
Updated•9 years ago
|
Attachment #8624053 -
Attachment is obsolete: true
Attachment #8624053 -
Flags: review?(echen)
Assignee | ||
Updated•9 years ago
|
Attachment #8640887 -
Attachment is obsolete: true
Attachment #8640887 -
Flags: review?(echen)
Assignee | ||
Comment 31•9 years ago
|
||
Keywords: checkin-needed
Comment 32•9 years ago
|
||
Comment 33•9 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/664df831252b
https://hg.mozilla.org/integration/b2g-inbound/rev/bbaf3960224b
https://hg.mozilla.org/integration/b2g-inbound/rev/b32bac59574b
Keywords: checkin-needed
Comment 34•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/664df831252b
https://hg.mozilla.org/mozilla-central/rev/bbaf3960224b
https://hg.mozilla.org/mozilla-central/rev/b32bac59574b
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S4 (07Aug)
Reporter | ||
Comment 35•9 years ago
|
||
b2g-kitkat:
https://github.com/mozilla-b2g/platform_hardware_ril/commit/147b71ad0e03b30318baae4bf07981aa0e96ca1d
https://github.com/mozilla-b2g/platform_hardware_ril/commit/3453472769d6e9b43c84f98b56f8c63afe2b129e
https://github.com/mozilla-b2g/platform_external_qemu/commit/96f78964a9a317a6c8b494ab71e10e0276d02490
You need to log in
before you can comment on or make changes to this bug.
Description
•