Closed
Bug 883178
Opened 11 years ago
Closed 11 years ago
[MMI] Implement DOMMMIResult and DOMMMIError
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
People
(Reporter: ferjm, Assigned: ferjm)
References
Details
(Whiteboard: TaipeiWW [LeoVB+])
Attachments
(4 files, 8 obsolete files)
2.39 KB,
patch
|
sicking
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
23.09 KB,
patch
|
vicamo
:
review+
sicking
:
superreview+
|
Details | Diff | Splinter Review |
7.47 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
33.99 KB,
patch
|
vicamo
:
review+
ferjm
:
superreview+
|
Details | Diff | Splinter Review |
Assignee | ||
Updated•11 years ago
|
Component: Gaia → DOM: Device Interfaces
Product: Boot2Gecko → Core
Assignee | ||
Comment 1•11 years ago
|
||
Blocks a blocker, so leo?
Assignee: nobody → ferjmoreno
blocking-b2g: --- → leo?
Assignee | ||
Updated•11 years ago
|
Blocks: mmi-result-pin
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Summary: [MMI] Implement nsIMMIResult → [MMI] Implement MMIResult
Assignee | ||
Updated•11 years ago
|
Blocks: mmi-localization-pin
Assignee | ||
Updated•11 years ago
|
Blocks: mmi-result-cf
Assignee | ||
Updated•11 years ago
|
Blocks: mmi-localization-cw
Assignee | ||
Updated•11 years ago
|
Blocks: mmi-localization-cb
Assignee | ||
Updated•11 years ago
|
Blocks: mmi-result-imei
Assignee | ||
Updated•11 years ago
|
No longer blocks: mmi-localization-pin, mmi-result-cf
Comment 2•11 years ago
|
||
Triage- blocking as this bug blocks a bunch of leo+ blockers.
blocking-b2g: leo? → leo+
Assignee | ||
Comment 3•11 years ago
|
||
This patch adds the MMIResult implementation and basic usage. As you can see there are a few TODO comments associated with some bugs blocked by this one, all the patches for these bugs should be pushed together, so we don't break any MMI functionality.
Attachment #764801 -
Flags: review?(vyang)
Updated•11 years ago
|
Whiteboard: TaipeiWW
Comment 4•11 years ago
|
||
Comment on attachment 764801 [details] [diff] [review]
v1
Review of attachment 764801 [details] [diff] [review]:
-----------------------------------------------------------------
I think there is still something we need to figure out in this patch. :(
::: dom/network/src/MobileConnection.cpp
@@ +282,3 @@
> {
> + *aRequest = nullptr;
> +
We don't really need this, do we?
@@ +298,3 @@
> {
> + *aRequest = nullptr;
> +
ditto.
::: dom/system/gonk/RILContentHelper.js
@@ +1541,5 @@
>
> handleSendCancelMMIOK: function handleSendCancelMMIOK(message) {
> let request = this.takeRequest(message.requestId);
> + if (!request && !message.success) {
> + return;
When we reach here, it means we had either a "RIL:SendMMI:Return:OK" or a "RIL:CancelMMI:Return:OK", which follows |message.success| must be true. So this condition will never take effect and we may then fireSuccess upon an invalid request object.
@@ +1562,5 @@
> + serviceCode: message.mmiServiceCode,
> + statusMessage: message.result
> + };
> +
> + switch(message.mmiServiceCode) {
nit: SP before left parenthesis.
@@ +1566,5 @@
> + switch(message.mmiServiceCode) {
> + case RIL.MMI_KS_SC_PIN:
> + case RIL.MMI_KS_SC_PIN2:
> + case RIL.MMI_KS_SC_PUK:
> + case RIL.MMI_KS_SC_PUK2:
This patch depends on symbols in bug 879032, but those symbols are not referenced in that bug at all. Please move them into this patch instead.
::: dom/system/gonk/ril_worker.js
@@ +2241,5 @@
> // Call forwarding requires at least an action, given by the MMI
> // procedure, and a reason, given by the MMI service code, but there
> // is no way that we get this far without a valid procedure or service
> // code.
> options.action = MMI_PROC_TO_CF_ACTION[mmi.procedure];
nit: can we move |options.mmiServiceCode = ...| right above this line?
Attachment #764801 -
Flags: review?(vyang)
Assignee | ||
Comment 5•11 years ago
|
||
Thanks Vicamo!
This patch should address your feedback.
As you can see, I've only added the MMI related consts that are actually used. I've also unified the handlers for RIL:SendMMI:Return:* and RIL:CancelMMI:Return:*.
Attachment #764801 -
Attachment is obsolete: true
Attachment #765429 -
Flags: review?(vyang)
Updated•11 years ago
|
Component: DOM: Device Interfaces → Gaia
Product: Core → Boot2Gecko
Target Milestone: --- → 1.1 QE3 (24jun)
Assignee | ||
Comment 6•11 years ago
|
||
I don't think this belongs to Gaia.
Component: Gaia → DOM: Device Interfaces
Product: Boot2Gecko → Core
Comment 7•11 years ago
|
||
Comment on attachment 765429 [details] [diff] [review]
v2
Review of attachment 765429 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/RILContentHelper.js
@@ -1537,5 @@
> - // MMI query call forwarding options request returns a set of rules that
> - // will be exposed in the form of an array of nsIDOMMozMobileCFInfo
> - // instances.
> - if (message.success && message.rules) {
> - this._cfRulesToMobileCfInfo(message.rules);
I guess CF support is going to be moved to RIL.MMI_KS_SC_CALL_FORWARDING case below? If so, will we be sending up message.additionalInformation for CF info instead of message.rules (of course in the same form as before)?
Assignee | ||
Comment 8•11 years ago
|
||
Yes, that's the idea :)
Assignee | ||
Updated•11 years ago
|
Attachment #765429 -
Flags: review?(vyang)
Assignee | ||
Updated•11 years ago
|
Summary: [MMI] Implement MMIResult → [MMI] Implement MMIResult and MMError
Assignee | ||
Updated•11 years ago
|
Depends on: 885701
Summary: [MMI] Implement MMIResult and MMError → [MMI] Implement MMIResult and MMIError
Assignee | ||
Comment 9•11 years ago
|
||
After talking with Vicamo via IRC, we decided to also implement MMIError apart from MMIResult. So MMI requests will return:
- A plain string for invalid or not recognized MMI requests, via DOMRequest.error.
- An MMIResult for successful MMI requests, via DOMRequest.result.
- An MMIError for failed MMI requests, via DOMRequest.error.
MMIError will inherit from DOMError.
Assignee | ||
Comment 10•11 years ago
|
||
This patch allows other components to inherit from DOMError (via WebIDL).
Jonas, Mounir, sorry for the r? broadcast, but this is quite important for the Taipei work week target milestone.
Thanks!
Attachment #765429 -
Attachment is obsolete: true
Attachment #767637 -
Flags: superreview?(mounir)
Attachment #767637 -
Flags: review?(mounir)
Attachment #767637 -
Flags: review?(jonas)
Assignee | ||
Comment 11•11 years ago
|
||
Vicamo, this patch implements MMIResult and MMIError and includes its basic usage for the get IMEI and USSD functionalities.
Attachment #767638 -
Flags: review?(vyang)
Assignee | ||
Comment 12•11 years ago
|
||
I'll need to write different patches for b2g18, hopefully today (CST).
Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 767638 [details] [diff] [review]
(mozilla-central) Part 1: MMIResult and MMIError
I think I need to ask for sr? for the WebIDL introduction. Bugzilla only allows me to set one superreviewer, but I'm also doing a sr? broadcast for this :). Sorry for the noise in your review queues :\
Attachment #767638 -
Flags: superreview?(jonas)
Assignee | ||
Comment 14•11 years ago
|
||
Carol, does the MMIError introduced make sense for you?
Flags: needinfo?(cyang)
Comment 15•11 years ago
|
||
Comment on attachment 767637 [details] [diff] [review]
(mozilla-central) Part 0: DOMError
Review of attachment 767637 [details] [diff] [review]:
-----------------------------------------------------------------
It's not really clear why .init() is needed here. It seems that peterv suggested it and I guess it might be because it is not possible to call the DOMError ctor from a JS child of DOMError? Instead of sr+ based on that supposition, I will let peterv do the honour.
Attachment #767637 -
Flags: superreview?(peterv)
Attachment #767637 -
Flags: superreview?(mounir)
Attachment #767637 -
Flags: review?(mounir)
Comment 16•11 years ago
|
||
Comment on attachment 767638 [details] [diff] [review]
(mozilla-central) Part 1: MMIResult and MMIError
Review of attachment 767638 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/RILContentHelper.js
@@ -1538,5 @@
> - // will be exposed in the form of an array of nsIDOMMozMobileCFInfo
> - // instances.
> - if (message.success && message.rules) {
> - this._cfRulesToMobileCfInfo(message.rules);
> - message.result = message.rules;
It seems you removed CF result handling accidentally in the new patch.
Attachment #767638 -
Flags: review?(vyang)
Assignee | ||
Comment 17•11 years ago
|
||
Not really, that's going to be added again in bug 879680
Assignee | ||
Comment 18•11 years ago
|
||
Comment on attachment 767638 [details] [diff] [review]
(mozilla-central) Part 1: MMIResult and MMIError
So the idea is to add the basic MMIResult and MMIError support and the get IMEI and USSD cases. Other specific cases for PIN/PIN2 handling and CF will be addressed in bug 874000 and bug 879680 for Gecko and Gaia. The rest of the MMI related bugs are Gaia only since we don't support yet some MMI codes (CW, CB) that the commercial RIL does.
There's an explanation of all the required work for MMI localization at https://bugzilla.mozilla.org/show_bug.cgi?id=879032#c51
Attachment #767638 -
Flags: review?(vyang)
Comment 19•11 years ago
|
||
Comment on attachment 767638 [details] [diff] [review]
(mozilla-central) Part 1: MMIResult and MMIError
Review of attachment 767638 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/RILContentHelper.js
@@ +1556,5 @@
> }
> Services.DOMRequest.fireSuccess(request, null);
> },
>
> + handleSendCancelMMI: function handleSendCancelMMI(message) {
Could you still leave a "TODO: bug 879680 - ..." comment to address the missed CF handling here? Thank you :)
Attachment #767638 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 20•11 years ago
|
||
Sure! Thanks for the quick review!
Comment 21•11 years ago
|
||
(In reply to Fernando Jiménez Moreno [:ferjm] (needinfo instead of CC, please) from comment #14)
> Carol, does the MMIError introduced make sense for you?
Yeah, seems quite similar to what you suggested in https://bugzilla.mozilla.org/show_bug.cgi?id=879032#c26 so this should be fine for us.
Flags: needinfo?(cyang)
Comment 22•11 years ago
|
||
CLIR is also included?
In attachment 767638 [details] [diff] [review], CLIR is not supported like below.
+ case MMI_SC_CLIR:
+ _sendMMIError(MMI_ERROR_KS_NOT_SUPPORTED);
Flags: needinfo?(ferjmoreno)
Assignee | ||
Comment 23•11 years ago
|
||
Not in the reference RIL, not sure about the commercial one.
Flags: needinfo?(ferjmoreno)
Comment 24•11 years ago
|
||
Carol, can you answer Comment 22?
CLIR is supported or not?
Flags: needinfo?(cyang)
Assignee | ||
Updated•11 years ago
|
Attachment #767637 -
Attachment description: Gecko (mozilla-central) Part 0: DOMError → (mozilla-central) Part 0: DOMError
Assignee | ||
Updated•11 years ago
|
Attachment #767638 -
Attachment description: Gecko (mozilla-central) Part 1: MMIResult and MMIError → (mozilla-central) Part 1: MMIResult and MMIError
Assignee | ||
Comment 26•11 years ago
|
||
(In reply to Anshul from comment #25)
> Yes CLIR is supported by commercial RIL.
I guess CLIP is also supported, so we'll also need to handle the localization of this requests in Gaia.
I am not familiar with this kind of requests. Anshul, could you provide an example of successful/failure for CLIR/CLIP request and what you expect to show in Gaia, please? We might be able to handle this as the general MMI use case in Gaia, so no extra work would be required.
Flags: needinfo?(anshulj)
Assignee | ||
Comment 27•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #768248 -
Attachment description: (b2g18) MMIResult and MMIError → (b2g18) MMIResult and MMIError - WIP
Comment 28•11 years ago
|
||
Hi Fernando,
This experimental patch works for me. I don't really have much time to check what's the main difference with yours. Maybe you can try this way. :)
Assignee | ||
Comment 29•11 years ago
|
||
(In reply to Gene Lian [:gene] from comment #28)
> Created attachment 768269 [details] [diff] [review]
> Experimental Patch for the Inheritance of DOMError in b2g18
>
> Hi Fernando,
>
> This experimental patch works for me. I don't really have much time to check
> what's the main difference with yours. Maybe you can try this way. :)
Wow thanks Gene!
It also works for me! In fact it is the same method as the one I use in the WIP that I uploaded before. My problem was a local issue with the code that called the MMIError instantiation. I've just figured it out :(. Sorry about that.
In any case, I'm talking to mounir to check if this is the appropriate way to inherit from DOMError in b2g18 or if there is a better and cleaner way.
Thanks a lot for your help!
Comment 30•11 years ago
|
||
(In reply to Fernando Jiménez Moreno [:ferjm] (needinfo instead of CC, please) from comment #26)
> (In reply to Anshul from comment #25)
> > Yes CLIR is supported by commercial RIL.
>
> I guess CLIP is also supported, so we'll also need to handle the
> localization of this requests in Gaia.
>
> I am not familiar with this kind of requests. Anshul, could you provide an
> example of successful/failure for CLIR/CLIP request and what you expect to
> show in Gaia, please? We might be able to handle this as the general MMI use
> case in Gaia, so no extra work would be required.
Hi Fernando, CLIR allows restricting of out going calls (shows private number). Display in Gaia should be pretty similar to the general case for other MMI codes. For example:
Outgoing Caller ID
Caller ID defaults to not restricted. Next call: Not restricted
I would be sending this up in success case for interrogate:
{
requestId : 'id{07db922e-b856-4248-8909-165a8ddc3bc4}',
mmiServiceCode : 'scClir',
result : 'smClirDefaultOffNextCallOff'
}
Error case:
{
requestId : 'id{4b3d24e6-d93f-461e-9c3f-9b91bf6dc10b}',
mmiServiceCode : 'scClir',
errorMsg : 'emMmiError'
}
CLIP is for turning caller ID on/off. The Gaia display and and what we send would be the same as CLIR but with scClip as the mmiServiceCode.
Are you going to include support for CLIR/CLIP in this bug or should I open another bug to track them?
Flags: needinfo?(anshulj) → needinfo?(ferjmoreno)
Assignee | ||
Comment 31•11 years ago
|
||
Great! Thanks Carol!
It seems that no extra work is required as these MMISuccess/MMIError messages will be handled properly by the default handler added in bug 884349. Unless there is any extra use case that require us to handle additional information within the MMISuccess or MMIError objects.
Flags: needinfo?(ferjmoreno)
Comment 32•11 years ago
|
||
Perfect! I'll definitely let you know when I've ran into cases that need special handling. Thanks for the prompt responses!
Assignee | ||
Updated•11 years ago
|
Summary: [MMI] Implement MMIResult and MMIError → [MMI] Implement DOMMMIResult and DOMMMIError
Assignee | ||
Updated•11 years ago
|
Attachment #768248 -
Attachment is obsolete: true
Assignee | ||
Comment 33•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #768399 -
Attachment description: (b2g18) DOMErrorHelper.jsm → (b2g18) Part 0: DOMErrorHelper.jsm
Assignee | ||
Comment 34•11 years ago
|
||
Assignee | ||
Comment 35•11 years ago
|
||
Attachment #768269 -
Attachment is obsolete: true
Assignee | ||
Comment 36•11 years ago
|
||
This one was hard...
As happened in m-c, nsIDOMDOMError is not inheritable the way it is now in b2g18. We need a setter or an initializer for its properties so it can be called from the child components. However this setter or initializer can't be part of the public API. That can be done in WebIDL (ChromeOnly) for m-c, but not for b2g18. So for b2g18 we need to have the inheritable JS implementation in the same file as the child component. Unfortunately, it cannot be added to a JSM.
Attachment #768399 -
Attachment is obsolete: true
Attachment #768401 -
Attachment is obsolete: true
Attachment #768403 -
Attachment is obsolete: true
Attachment #768694 -
Flags: review?(anygregor)
Assignee | ||
Comment 37•11 years ago
|
||
Attachment #768695 -
Flags: superreview?(jonas)
Attachment #768695 -
Flags: review?(vyang)
Updated•11 years ago
|
Attachment #768694 -
Flags: review?(anygregor) → review+
Assignee | ||
Comment 38•11 years ago
|
||
Thanks Gregor!
Attachment #767637 -
Flags: review?(jonas) → review+
Attachment #767638 -
Flags: superreview?(jonas) → superreview+
Attachment #768695 -
Flags: superreview?(jonas) → superreview+
Assignee | ||
Comment 39•11 years ago
|
||
Thanks Jonas! I guess I also need to thanks the jet lag this time :)
Assignee | ||
Comment 40•11 years ago
|
||
sr=sicking
Attachment #768818 -
Flags: superreview+
Attachment #768818 -
Flags: review?(vyang)
Assignee | ||
Updated•11 years ago
|
Attachment #768818 -
Attachment description: Part 1: MMIResult and MMIError → (b2g18) Part 1: MMIResult and MMIError
Assignee | ||
Updated•11 years ago
|
Attachment #768695 -
Attachment is obsolete: true
Attachment #768695 -
Flags: review?(vyang)
Comment 41•11 years ago
|
||
Comment on attachment 767637 [details] [diff] [review]
(mozilla-central) Part 0: DOMError
Review of attachment 767637 [details] [diff] [review]:
-----------------------------------------------------------------
Mounir: there's no easy way to know which arguments need to be passed through to the base class constructor when we generate the C++ binding for the inherited interface, so the JS implementation has to have a way to explicitly pass the arguments to the base class through a separate initialization function.
Attachment #767637 -
Flags: superreview?(peterv) → superreview+
Assignee | ||
Comment 42•11 years ago
|
||
Thanks Peter!
FTR I need to wait for the other MMI related bugs to be r+ before start landing the whole set of patches.
Comment 43•11 years ago
|
||
Comment on attachment 767638 [details] [diff] [review]
(mozilla-central) Part 1: MMIResult and MMIError
Review of attachment 767638 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/RILContentHelper.js
@@ +1244,3 @@
> case "RIL:SendMMI:Return:KO":
> case "RIL:CancelMMI:Return:KO":
> + this.handleSendCancelMMI(msg.json);
Since you combined both the SendMMIOK and SendMMIKO and relying on message.success to determine if it is a success or a failure case, what's the point of having two different messages MMIOK and MMIKO?
Updated•11 years ago
|
Attachment #768818 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 44•11 years ago
|
||
Thanks Vicamo! Now we only need to get the r+ for bug 874000 patches before landing the whole stack of fixes.
(In reply to Anshul from comment #43)
> Comment on attachment 767638 [details] [diff] [review]
> (mozilla-central) Part 1: MMIResult and MMIError
>
> Review of attachment 767638 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/system/gonk/RILContentHelper.js
> @@ +1244,3 @@
> > case "RIL:SendMMI:Return:KO":
> > case "RIL:CancelMMI:Return:KO":
> > + this.handleSendCancelMMI(msg.json);
>
> Since you combined both the SendMMIOK and SendMMIKO and relying on
> message.success to determine if it is a success or a failure case, what's
> the point of having two different messages MMIOK and MMIKO?
You are right! I'll remove it in a follow up bug
Assignee | ||
Comment 45•11 years ago
|
||
We need to land the Gaia side because of the string freeze, so even if bug 874000 is not yet reviewed, I need to push this alone. That means that we will temporary have no MMI support for CF and PIN/PUK related functionality until bug 874000 lands (hopefully tomorrow CST).
http://hg.mozilla.org/projects/birch/rev/d9ae62e6d7f3
http://hg.mozilla.org/projects/birch/rev/1fd0dd1c09f7
Comment 46•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d9ae62e6d7f3
https://hg.mozilla.org/mozilla-central/rev/1fd0dd1c09f7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 47•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/1996c3748df9
https://hg.mozilla.org/releases/mozilla-b2g18/rev/5a3c2e04e6c1
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-b2g-v1.1hd:
--- → affected
Assignee | ||
Comment 48•11 years ago
|
||
Backed out from b2g18 due to chrome tests failure.
https://hg.mozilla.org/releases/mozilla-b2g18/rev/2d9072f92b52
I won't be able to fix it until tomorrow as I am taking a 20 hours flight.
Comment 49•11 years ago
|
||
Comment on attachment 767638 [details] [diff] [review]
(mozilla-central) Part 1: MMIResult and MMIError
Review of attachment 767638 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/ril_worker.js
@@ +2219,5 @@
> options.ussd = mmiString;
> this.sendUSSD(options);
> return;
> }
> + _sendMMIError(MMI_ERROR_KS_ERROR);
It seems that this line cause xpcshell-test failure
Should update the test case accordingly.
dom/system/gonk/tests/test_ril_worker_mmi.js
Ex: in test_ril_worker_mmi.js
testSendMMI("**", "NO_VALID_MMI_STRING");
...
and others
Comment 50•11 years ago
|
||
(In reply to Szu-Yu Chen [:aknow] from comment #49)
> Comment on attachment 767638 [details] [diff] [review]
> (mozilla-central) Part 1: MMIResult and MMIError
>
> Review of attachment 767638 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/system/gonk/ril_worker.js
> @@ +2219,5 @@
> > options.ussd = mmiString;
> > this.sendUSSD(options);
> > return;
> > }
> > + _sendMMIError(MMI_ERROR_KS_ERROR);
>
> It seems that this line cause xpcshell-test failure
>
> Should update the test case accordingly.
> dom/system/gonk/tests/test_ril_worker_mmi.js
>
> Ex: in test_ril_worker_mmi.js
> testSendMMI("**", "NO_VALID_MMI_STRING");
> ...
> and others
bug for test case fail => Bug 889215
Assignee | ||
Comment 51•11 years ago
|
||
Thanks Szy-Yu!
I needed to modify "(b2g18) Part 0..." patch so we keep the DOMError implementation in Webapps.js if MOZ_B2G_RIL is not defined.
Try build looked good after that fix.
Re-pushed to b2g18:
https://hg.mozilla.org/releases/mozilla-b2g18/rev/dd85f9fd4e55
https://hg.mozilla.org/releases/mozilla-b2g18/rev/34ee4ae06093
Assignee | ||
Updated•11 years ago
|
Comment 52•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/dd85f9fd4e55
https://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/34ee4ae06093
Updated•11 years ago
|
Whiteboard: TaipeiWW → TaipeiWW [LeoVB+]
You need to log in
before you can comment on or make changes to this bug.
Description
•