Closed Bug 879680 (mmi-result-cf) Opened 11 years ago Closed 11 years ago

[MMI] Use MMIResult for Call Forwarding related functionality

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:leo+, firefox23 wontfix, firefox24 wontfix, firefox25 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

RESOLVED FIXED
1.1 QE3 (26jun)
blocking-b2g leo+
Tracking Status
firefox23 --- wontfix
firefox24 --- wontfix
firefox25 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed

People

(Reporter: bov, Assigned: jaoo)

References

Details

(Keywords: late-l10n, Whiteboard: [mozilla-triage] TaipeiWW, [LeoVB+])

Attachments

(2 files, 6 obsolete files)

Steps    
- Settings, Language, Set to any language except english    
- Open Dialer App, type "*21#, and click on the green dialer button

Actual Result:
As you didn't register first, the system detects an erroneous workflow and returns an error message, but this is written in english, not in the selected language in Settings.
Tested on Unagi device. Build :Gecko-52341e4.Gaia-71c3bcd CommRIL:AU105
Result:"Call forwarding generic failure"
Tested on Unagi device. Build :Gecko-80fd2ae.Gaia-0a1cf9f CommRIL:AU115
Result:"GenericFailure"


Expected Result:
The error message should be shown in the selected language in Settings
Blocks: 879750
These look like issues partners will care about having fixed for releasing in target markets - Michael seems related to 879032 - thoughts?
Flags: needinfo?(mvines)
Whiteboard: [mozilla-triage]
Flags: needinfo?(mvines)
Flags: needinfo?(anshulj)
Depends on: 879032
Flags: needinfo?(anshulj)
Assignee: nobody → cyang
Partner think it's a blocker
blocking-b2g: leo? → leo+
Partner think it's a blocker
Blocks: 881853
Assignee: cyang → ferjmoreno
Alias: mmi-localization-cf
Summary: [Supplementary Service][Call Forwarding][COMMERCIAL RIL] Call Forwarding SS error responses are shown in English when selected language is other → [MMI] Localization of Call Forwarding functionality
No longer blocks: 879750
No longer depends on: 883178
Keywords: late-l10n
Target Milestone: --- → 1.1 QE3 (24jun)
Whiteboard: [mozilla-triage] → [mozilla-triage] TaipeiWW
Alias: mmi-localization-cf → mmi-result-cf
Summary: [MMI] Localization of Call Forwarding functionality → [MMI] Use MMIResult for Call Forwarding related functionality
Attached patch Gecko part - WIP (obsolete) — Splinter Review
Attached patch Gaia part - WIP (obsolete) — Splinter Review
Comment on attachment 768036 [details] [diff] [review]
Gecko part - WIP

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

::: dom/system/gonk/RILContentHelper.js
@@ +1594,5 @@
> +        if (message.success) {
> +           // 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.rules) {

While we are on it, can we change ril code to send message.result instead of message.rules just like every other MMI code result to be consistent?
Comment on attachment 768036 [details] [diff] [review]
Gecko part - WIP

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

::: dom/system/gonk/RILContentHelper.js
@@ +1600,5 @@
> +            result.statusMessage = message.rules;
> +          } else {
> +            // MMI set call forwaring option request doesn't return anything
> +            // rather than success in case of no erros.
> +            result.statusMessage = RIL.MMI_KS_SM_CALL_FORWARDING_SET_SUCCESS;

Also instead of setting a default RIL.MMI_KS_SM_CALL_FORWARDING_SET_SUCCESS message, you should read the statuMessage code sent by RIL (RIL needs to send a MMI status code such as smServiceEnabled from https://bugzilla.mozilla.org/attachment.cgi?id=765428&action=diff)

::: dom/system/gonk/ril_consts.js
@@ +2510,5 @@
>  MMI_SC_TO_CF_REASON[MMI_SC_CF_ALL] = CALL_FORWARD_REASON_ALL_CALL_FORWARDING;
>  MMI_SC_TO_CF_REASON[MMI_SC_CF_ALL_CONDITIONAL] = CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING;
>  
> +// MMI status message
> +this.MMI_KS_SM_CALL_FORWARDING_SET_SUCCESS = "smCallForwardingSetSuccess";

No need for this new one, you can use smServiceEnabled along with service code sent to gaia should be sufficient for user to understand that call forwarding is successfully enabled.
Attached patch Gecko part - v1 (obsolete) — Splinter Review
Attachment #768036 - Attachment is obsolete: true
Attachment #768037 - Attachment is obsolete: true
Attachment #768325 - Flags: review?(ferjmoreno)
Attached patch Gaia part - v1 (obsolete) — Splinter Review
Attachment #768329 - Flags: review?(ferjmoreno)
Comment on attachment 768325 [details] [diff] [review]
Gecko part - v1

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

::: dom/system/gonk/ril_consts.js
@@ +2570,5 @@
> +this.MMI_SM_KS_SERVICE_ENABLED = "smServiceEnabled";
> +this.MMI_SM_KS_SERVICE_DISABLED = "smServiceDisabled";
> +this.MMI_SM_KS_SERVICE_REGISTERED = "smServiceRegistered";
> +this.MMI_SM_KS_SERVICE_ERASED = "smServiceErased";
> +this.MMI_SM_KS_SERVICE_INTERROGATED = "smServiceInterrogated";

Actually `smServiceInterrogated` key is not need at all. We could delete it and use `smServiceEnabled` key instead.
Comment on attachment 768325 [details] [diff] [review]
Gecko part - v1

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

::: dom/system/gonk/RILContentHelper.js
@@ +1635,5 @@
>        case RIL.MMI_KS_SC_CALL_FORWARDING:
> +        if (message.success) {
> +          switch (message.action) {
> +            case RIL.CALL_FORWARD_ACTION_ENABLE:
> +              result.statusMessage = RIL.MMI_SM_KS_SERVICE_ENABLED; 

Antonio, it seems like for every MMI code RIL returns data in a different format which is very inconsistent and prone to bugs. What do you think about my comment at https://bugzilla.mozilla.org/show_bug.cgi?id=874000#c22
Assignee: ferjmoreno → josea.olivera
Attachment #768325 - Flags: review?(ferjmoreno)
Comment on attachment 768329 [details] [diff] [review]
Gaia part - v1

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

Can you follow the approach suggested by Anshul, please?

Thanks!
Attachment #768329 - Flags: review?(ferjmoreno)
Attached patch Gecko part - v2 (obsolete) — Splinter Review
Attachment #768325 - Attachment is obsolete: true
Attachment #768871 - Flags: review?(ferjmoreno)
Attachment #768871 - Flags: feedback?(anshulj)
Comment on attachment 768871 [details] [diff] [review]
Gecko part - v2

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

I guess this version address the comments from Anshul. If not, please let me know.

::: dom/system/gonk/RILContentHelper.js
@@ +1582,5 @@
> +    if (message.mmiServiceCode === RIL.MMI_KS_SC_CALL_FORWARDING &&
> +        message.rules) {
> +      message.additionalInformation =
> +        this._cfRulesToMobileCfInfo(message.additionalInformation);
> +    }

Sadly we have to so this here. Am I right?
Comment on attachment 768871 [details] [diff] [review]
Gecko part - v2

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

Thanks jaoo :)! This looks good to me. However I am not a RIL peer, so you'll need to get an r+ from vicamo too.

::: dom/system/gonk/ril_consts.js
@@ +260,5 @@
>  this.GECKO_ERROR_SS_MODIFIED_TO_SS = "SsModifiedToSs";
>  this.GECKO_ERROR_SUBSCRIPTION_NOT_SUPPORTED = "SubscriptionNotSupported";
>  this.GECKO_ERROR_INVALID_PARAMETER = "InvalidParameter";
>  this.GECKO_ERROR_REJECTED_BY_REMOTE = "RejectedByRemote";
> +this.GECKO_ERROR_NO_CALL_FORWARD_STATUS = "NoCallForwardStatus";

Is this an standard RIL error? Can you just return 'GenericError' in this case?

::: dom/system/gonk/ril_worker.js
@@ +4850,5 @@
>        rulesLength = Buf.readUint32();
>      }
>      if (!rulesLength) {
>        options.success = false;
> +      options.errorMsg = GECKO_ERROR_NO_CALL_FORWARD_STATUS;

GenericError?

@@ +4884,5 @@
>      }
> +    if (options.success && options.isSendMMI) {
> +      switch (options.action) {
> +        case CALL_FORWARD_ACTION_ENABLE:
> +          options.statusMessage = MMI_SM_KS_SERVICE_ENABLED; 

nit: trailing white space in all the switch cases.
Attachment #768871 - Flags: review?(vyang)
Attachment #768871 - Flags: review?(ferjmoreno)
Attachment #768871 - Flags: review+
Attached patch Gecko part - v3Splinter Review
Thanks ferjm!

ferjm's comment addressed. Carrying out r=ferjm.

Requesting review at Vicamo since ferjm is not a RIL peer as he has commneted.

Anshul, your feedback is welcome.
Attachment #768871 - Attachment is obsolete: true
Attachment #768871 - Flags: review?(vyang)
Attachment #768871 - Flags: feedback?(anshulj)
Attachment #768929 - Flags: review?(vyang)
Attachment #768929 - Flags: feedback?(anshulj)
Attached patch Gaia part - v2 (obsolete) — Splinter Review
Gaia side rebased.
Attachment #768329 - Attachment is obsolete: true
Attachment #768931 - Flags: review?(ferjmoreno)
Attachment #768931 - Attachment description: Gecko part - v2 → Gaia part - v2
Comment on attachment 768931 [details] [diff] [review]
Gaia part - v2

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

::: apps/communications/dialer/js/mmi.js
@@ +163,4 @@
>          }
>          break;
>        case 'scCallForwarding':
> +        if (mmiResult.statusMessage) {

I guess we always expect an statusMessage, can we have an else here showing a GenericError if no statusMessage is received, please? It's quite unlikely, but it is not good to show an empty screen.

::: apps/communications/dialer/locales/dialer.en-US.properties
@@ +100,4 @@
>  smServiceDisabled=Service has been disabled
>  smServiceRegistered=Registration was successful
>  smServiceErased=Erasure was successful
> +smServiceInterrogated=Resquest was successful

Typo: Request
Attachment #768931 - Flags: review?(ferjmoreno) → review+
Attachment #768929 - Flags: feedback?(anshulj) → feedback+
Attached patch Gaia part - v3Splinter Review
ferjm's comments addressed.

Carrying out r=ferjm
Attachment #768931 - Attachment is obsolete: true
Attachment #768929 - Flags: review?(gene.lian)
The Gecko patch depends on that of bug 874000.
Depends on: mmi-result-pin
Attachment #768929 - Flags: review?(vyang)
Attachment #768929 - Flags: review?(gene.lian)
Attachment #768929 - Flags: review+
(In reply to Fernando Jiménez Moreno [:ferjm] (needinfo instead of CC, please) from comment #24)
> http://hg.mozilla.org/projects/birch/rev/16a6252d6d68

Thanks, you were faster than me! I was trying to push when I noticed you did it!
https://hg.mozilla.org/mozilla-central/rev/16a6252d6d68
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
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.
This change also needs to be uplifted to v1-train please.
Flags: needinfo?(josea.olivera)
v1-train: f053424f88e89bdab874d074482d0eb0c2be9d39
v1.1hd: ef6c723dab955ae18d0e324a06558e78c8eb9a1b
Flags: needinfo?(josea.olivera)
Whiteboard: [mozilla-triage] TaipeiWW → [mozilla-triage] TaipeiWW, [LeoVB+]
v1.1.0hd: f053424f88e89bdab874d074482d0eb0c2be9d39
Depends on: 896980
No longer depends on: 896980
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: