Closed Bug 786694 Opened 13 years ago Closed 13 years ago

B2G RIL: Import 2G SIM Contacts

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

Attachments

(2 files, 5 obsolete files)

Currently B2G cannot import 2G SIM(i.e. APP_TYPE_SIM) contacts, we need to fix this.
Upload current WIP Patches, but cannot test on the phone because I met problems in Bug 786686
Depends on: 786686
Attached patch Part 1: Patch to get sim contact (obsolete) — Splinter Review
Attachment #656470 - Attachment is obsolete: true
Attachment #657302 - Flags: review?(philipp)
Attached patch Part 2: Error callback (obsolete) — Splinter Review
Hi, philikon This patch deals with error, i.e. when sim is not inserted So ContactService still get get callback. Thanks
Attachment #656471 - Attachment is obsolete: true
Attachment #657304 - Flags: review?(philipp)
Comment on attachment 657302 [details] [diff] [review] Part 1: Patch to get sim contact Review of attachment 657302 [details] [diff] [review]: ----------------------------------------------------------------- I liek. ::: dom/system/gonk/ril_worker.js @@ +1420,5 @@ > + * > + * @params type > + * "ADN" or "FDN". > + * @params requestId > + * Request id from RadioInterfaceLayer. Don't need to mention `requestId` since the ril_worker is oblivious to it. @@ +1428,5 @@ > + switch (type) { > + case "ADN": > + switch (this.appType) { > + case CARD_APPTYPE_SIM: > + options.fileId = ICC_EF_ADN; Nit: trailing whitespace (also below)
Attachment #657302 - Flags: review?(philipp) → review+
Comment on attachment 657304 [details] [diff] [review] Part 2: Error callback Review of attachment 657304 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/ril_worker.js @@ +1360,5 @@ > type: EF_TYPE_LINEAR_FIXED, > callback: callback, > loadAll: true, > + requestId: options.requestId, > + error: error Can we call this `onerror` and put it next to the `callback` property, to signify that they're both functions. (I'm not also wondering whether we should rename `callback` to `onsuccess` to match, but that's more work and risk than I'd like to introduce right now.) @@ +1477,5 @@ > + function error(options) { > + this.sendDOMMessage({rilMessageType: "icccontacts", > + contactType: "ADN", > + contacts: [], > + requestId: options.requestId}); Reuse `options`? (Also above.)
Attachment #657304 - Flags: review?(philipp) → review+
Address to philikon's comments - remove requestId from comments - remove trailing whitespace.
Attachment #657302 - Attachment is obsolete: true
Address to philikon's comments - error -> onerror and move it next to callback - reuse options
Attachment #657304 - Attachment is obsolete: true
Blocks: 1157082
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: