Closed Bug 915038 Opened 6 years ago Closed 6 years ago

[Dialer] MMI codes not working in dialer app

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed)

RESOLVED FIXED
blocking-b2g koi+
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: zcampbell, Assigned: ferjm)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Dialing *#06# in the Dialer app is not displaying the IMEI.

This test started failing on the 10th Sept nightly Unagi build.



Build:
Gecko  http://hg.mozilla.org/mozilla-central/rev/740094c07328
Gaia  753bed59566ad14c5e032e45d2b320ef9529ca9a
BuildID 20130909195843
Version 26.0a1
Keywords: regression
More info:

This was tested on an unagi 1.2 mozilla ril build
blocking-b2g: --- → koi?
Looking into it.  We have already a test case for getting device IMEI, if that's a regression, probably tbpl should fail first.  See http://mxr.mozilla.org/mozilla-central/source/dom/network/tests/marionette/test_mobile_mmi.js#61
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #2)
> Looking into it.  We have already a test case for getting device IMEI, if
> that's a regression, probably tbpl should fail first.  See
> http://mxr.mozilla.org/mozilla-central/source/dom/network/tests/marionette/
> test_mobile_mmi.js#61

Pass emulator test case with Gecko 8ec156e (tip yesterday), Gaia 2a326b3.
Reproduced on Unagi with Gecko 934822e, Gaia ebbb325.  Have following error messages every time I press dial("*#06#") on dialer screen:

  E/GeckoConsole(  451): [JavaScript Error: "ReferenceError: IccHelper is not defined" {file: "app://communications.gaiamobile.org/s     hared/js/mobile_operator.js" line: 9}]

Looks like a Gaia issue?
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #5)
> Created attachment 802976 [details]
> x.log.zip

All ICCIO in ril_worker fail with RequestNotSupported:

  I/Gecko   (  109): RIL Worker[0]: Received 16 bytes.
  I/Gecko   (  109): RIL Worker[0]: Already read 0
  I/Gecko   (  109): RIL Worker[0]: New incoming parcel of size 12
  I/Gecko   (  109): RIL Worker[0]: Parcel (size 12): 0,0,0,0,12,0,0,0,6,0,0,0
  I/Gecko   (  109): RIL Worker[0]: We have at least one complete parcel.
  I/Gecko   (  109): RIL Worker[0]: Solicited response for request type 28, token 12, error 6
  I/Gecko   (  109): RIL Worker[0]: Handling parcel as REQUEST_SIM_IO
  I/Gecko   (  109): RIL Worker[0]: ICC I/O Error code RequestNotSupported EF id = 2fe2 command = c0
Component: Gaia::Dialer → RIL
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #6)
>   I/Gecko   (  109): RIL Worker[0]: ICC I/O Error code RequestNotSupported
> EF id = 2fe2 command = c0

From Yoshi, that's a normal phenomenon.  We may have such error in early boot stage.  And, actually I can find IMEI in "Device Information" page right after booted.  The only thing fails now is, as the bug title said, dialer app doesn't show IMEI, and I've given that Gaia error dump in comment 4.

Reset component back to Gaia::Dialer.
Component: RIL → Gaia::Dialer
Assignee: nobody → ferjmoreno
Attached patch v1 (obsolete) — Splinter Review
Probably regressed because of bug 913540.

I've taken most part of the patch for bug 908117 for fixing this issue.
Attachment #803727 - Flags: review?(anthony)
Blocks: 908117
Comment on attachment 803727 [details] [diff] [review]
v1

Review of attachment 803727 [details] [diff] [review]:
-----------------------------------------------------------------

When I run mobile_operator_test.js alone, I get a "global leak detected: IccHelper". But not when I run |APP=system make test-agent-test|.
When I run |APP=communications/dialer make test-agent-test|, I get a "Mock MockMobileOperator has not been loaded into the test" error. (For some reason, I can't run mmi_test.js alone)

Can you please fix those?

Otherwise the fix looks good.

::: shared/js/mobile_operator.js
@@ +7,4 @@
>    userFacingInfo: function mo_userFacingInfo(mobileConnection) {
>      var network = mobileConnection.voice.network;
>      var iccInfo = IccHelper.iccInfo;
> +    var operator = network ? network.shortName || network.longName : null;

Please add parenthesis around the || operation to make it more obvious.

@@ +41,5 @@
>    isBrazil: function mo_isBrazil(mobileConnection) {
>      var cell = mobileConnection.voice.cell;
> +    var net = mobileConnection.voice.network;
> +    return net ?
> +           net.mcc === this.BRAZIL_MCC && cell && cell.gsmLocationAreaCode :

Please add parenthesis around this big boolean to emphasis that it's one long statement.
Attachment #803727 - Flags: review?(anthony) → review-
Thanks Anthony!

(In reply to Anthony Ricaud (:rik) from comment #9)
> Comment on attachment 803727 [details] [diff] [review]
> v1
> 
> Review of attachment 803727 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> When I run mobile_operator_test.js alone, I get a "global leak detected:
> IccHelper". But not when I run |APP=system make test-agent-test|.

Ugh, this is actually happening in master. It does not seem related with this patch. I'll take a look though.

> When I run |APP=communications/dialer make test-agent-test|, I get a "Mock
> MockMobileOperator has not been loaded into the test" error. (For some
> reason, I can't run mmi_test.js alone)
> 

Hmm... after rebasing on top of master, I can't even get there running |APP=communications/dialer make test-agent-test|. Call log DB tests are failing :(. Again, not related to this patch.

In any case, the "Mock MockMobileOperator has not been loaded into the test" error was caused because I forgot to git add mock_mobile_operator.js :( But I just realized that system tests already have this mock, so I'll use that instead.
Attached patch v2Splinter Review
Attachment #803727 - Attachment is obsolete: true
Summary: [Dialer] IMEI code not working in dialer app → [Dialer] MMI codes not working in dialer app
Comment on attachment 807196 [details] [diff] [review]
v2

Review of attachment 807196 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks a lot for fixing those unrelated errors!

Ship it.
Attachment #807196 - Flags: review?(anthony) → review+
Thanks!

https://github.com/mozilla-b2g/gaia/commit/7951cfe79ba29e2d933590d77c43351d3b03547e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
blocking-b2g: koi? → koi+
Uplifted 7951cfe79ba29e2d933590d77c43351d3b03547e to:
v1.2: 799666fd953a55e73fff089333c63ba69e8cb411
See Also: → 1090853
You need to log in before you can comment on or make changes to this bug.