Closed Bug 951958 Opened 11 years ago Closed 11 years ago

B2G RIL: set/get preferred network type error message is not set accordingly

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jessica, Assigned: jessica)

Details

Attachments

(1 file, 2 obsolete files)

RILContentHelper.handleSimpleRequest() relies on errorMsg to fire request error, we should set the errorMsg accordingly in ril_worker.
Attached patch proposed patch, v1. (obsolete) — Splinter Review
Attached patch proposed patch, v2. (obsolete) — Splinter Review
Attachment #8349803 - Attachment is obsolete: true
Comment on attachment 8349815 [details] [diff] [review]
proposed patch, v2.

Since emulator's modem is multimode, we are not able to make modem return error while setting preferred network type, so no test cases for this yet. :(

Try: https://tbpl.mozilla.org/?tree=Try&rev=3042a53d8298
Attachment #8349815 - Flags: review?(htsai)
Comment on attachment 8349815 [details] [diff] [review]
proposed patch, v2.

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

::: dom/system/gonk/ril_worker.js
@@ +5882,5 @@
>  
>    options.success = (options.rilRequestError == ERROR_SUCCESS);
> +  if (!options.success) {
> +    options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
> +  }

Seems redundant to check both options.rilRequestError and options.success.

How about this:

if (options.rilRequestError) {
    options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
}

@@ +5890,5 @@
>    options.success = (options.rilRequestError == ERROR_SUCCESS);
> +  if (!options.success) {
> +    options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
> +    this.sendChromeMessage(options);
> +    return;

ditto:
Attachment #8349815 - Flags: review?(htsai)
Hsinyi, I am keeping the option.success as discussed, as it is used in RadioInterfaceLayer. Please check if it's okay this way. Thanks.
Assignee: nobody → jjong
Attachment #8349815 - Attachment is obsolete: true
Attachment #8349913 - Flags: review?(htsai)
Comment on attachment 8349913 [details] [diff] [review]
proposed patch, v3.

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

Thank you.
Attachment #8349913 - Flags: review?(htsai) → review+
Thank you, Hsinyi.

Try for patch v3: https://tbpl.mozilla.org/?tree=Try&rev=72efb06e0504
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: