Closed Bug 1140259 Opened 10 years ago Closed 10 years ago

[B2G][RIL] Handle new error codes introduced in RIL version 10

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog, firefox39 fixed)

RESOLVED FIXED
2.2 S8 (20mar)
tracking-b2g backlog
Tracking Status
firefox39 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(2 files, 3 obsolete files)

+++ This bug was initially created as a follow-up of Bug #1113054 +++ There are some new error codes introduced in version 10 [1], we should map them into proper error string. [1] https://github.com/android/platform_hardware_ril/blob/lollipop-release/include/telephony/ril.h#L78-L103
See Also: → 1139823
ril_consts contains some error codes which are not lived in standard AOSP ril.h [1]. I guess they are partner's specific errors. [1] https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_consts.js?from=ril_consts.js&case=true#232-243
Assignee: nobody → echen
blocking-b2g: --- → backlog
See Also: → 1139063
Depends on: 1139063
Comment on attachment 8575188 [details] [diff] [review] Part 1: RIL error for version 10, v1 Review of attachment 8575188 [details] [diff] [review]: ----------------------------------------------------------------- In this part, I add new error code introduced in ril v10 (note that error code 16 was already added in bug 1139063). And also remove the partner's specific error code given that we didn't use them actually and they are conflicted with standard error code. Hi Hinsyi, may I have your review? Thank you.
Attachment #8575188 - Flags: review?(htsai)
Comment on attachment 8576478 [details] [diff] [review] Part 2: [RIL] Handle options.errorMsg in processParcel() and map unknown error code to "UnspecifiedError", v3 Review of attachment 8576478 [details] [diff] [review]: ----------------------------------------------------------------- Changes in this part: 1. Handle errorMsg in proccessParcel(). 2. Map unknown error code to "UnspecifiedError".
Attachment #8576478 - Flags: review?(htsai)
Attachment #8575188 - Flags: review?(htsai) → review+
Comment on attachment 8576478 [details] [diff] [review] Part 2: [RIL] Handle options.errorMsg in processParcel() and map unknown error code to "UnspecifiedError", v3 Review of attachment 8576478 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comments addressed, thank you! ::: dom/system/gonk/ril_worker.js @@ +5718,1 @@ > if ((!options.success || this.IMEI == null) && !options.errorMsg) { The condition is dazzling. We could simplify it as |if (this.IMEI == null && options.success)|. Since we are here, please modify it, too. @@ +5834,5 @@ > > this._updateNetworkSelectionMode(selectionMode); > }; > RilObject.prototype[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELECTION_AUTOMATIC(length, options) { > + if (!options.errorMsg) { In most cases, we still use "options.rilRequestError." Can we keep using that term? Alternatively, I will also be okay if we replace all existing "options.rilRequestError" with "options.errorMsg." Just want to have consistency. @@ +5841,4 @@ > this.sendChromeMessage(options); > }; > RilObject.prototype[REQUEST_SET_NETWORK_SELECTION_MANUAL] = function REQUEST_SET_NETWORK_SELECTION_MANUAL(length, options) { > + if (!options.errorMsg) { ditto. @@ +5847,4 @@ > this.sendChromeMessage(options); > }; > RilObject.prototype[REQUEST_QUERY_AVAILABLE_NETWORKS] = function REQUEST_QUERY_AVAILABLE_NETWORKS(length, options) { > + if (!options.errorMsg) { ditto.
Attachment #8576478 - Flags: review?(htsai) → review+
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #8) > Comment on attachment 8576478 [details] [diff] [review] > Part 2: [RIL] Handle options.errorMsg in processParcel() and map unknown > error code to "UnspecifiedError", v3 > > Review of attachment 8576478 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me with comments addressed, thank you! > > ::: dom/system/gonk/ril_worker.js > @@ +5718,1 @@ > > if ((!options.success || this.IMEI == null) && !options.errorMsg) { > > The condition is dazzling. We could simplify it as |if (this.IMEI == null && > options.success)|. > Since we are here, please modify it, too. Okay, will do in next version. > > @@ +5834,5 @@ > > > > this._updateNetworkSelectionMode(selectionMode); > > }; > > RilObject.prototype[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELECTION_AUTOMATIC(length, options) { > > + if (!options.errorMsg) { > > In most cases, we still use "options.rilRequestError." Can we keep using > that term? > Alternatively, I will also be okay if we replace all existing > "options.rilRequestError" with "options.errorMsg." Just want to have > consistency. Agree with you, I will use |rilRequestError| in this bug to have consistency. In fact, I already have a patch to deprecate all rilRequestError usage in bug 991582. Let's replace |rilRequestError| with |errorMsg| there. Thank you.
Address review comment #8. - if (this.IMEI == null && options.success) - Using |rilRequestError| to have consistency.
Attachment #8576478 - Attachment is obsolete: true
Attachment #8577072 - Flags: review+
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S8 (20mar)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: