Closed Bug 835802 Opened 12 years ago Closed 12 years ago

B2G RIL: Support SIM Contacts for more than 1 phonebook set.

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: piecu, Assigned: allstars.chh)

References

Details

(Whiteboard: interaction [UX-P1], [TEF_REQ], [fix-in-birch])

Attachments

(5 files, 12 obsolete files)

(deleted), patch
allstars.chh
: review+
Details | Diff | Splinter Review
(deleted), patch
allstars.chh
: review+
Details | Diff | Splinter Review
(deleted), patch
allstars.chh
: review+
Details | Diff | Splinter Review
(deleted), patch
allstars.chh
: review+
Details | Diff | Splinter Review
(deleted), patch
allstars.chh
: review+
Details | Diff | Splinter Review
I had exported 514 contacts to my SIM card using Android's contact manager. Then I imported them to B2G and only 250 got imported and many contacts are missing. Android currently says that there are 344 contacts on a SIM card (I guest that the rest are contacts with only email address filled without phone number).
Bartosz, This seems to be a similar issue to the one reported in bug 832898. as I said there once bug 835555 lands please recheck this as I believe that patch should be solving your issue. best
[UX-P1], [TEF_REQ] because import from SIM must import all contacts from SIM not a user undefined subset of them.
Whiteboard: interaction [UX-P1], [TEF_REQ]
(In reply to Jose M. Cantera from comment #1) > This seems to be a similar issue to the one reported in bug 832898. as I > said there once bug 835555 lands please recheck this as I believe that patch > should be solving your issue. Unfortunately that didn't solve the case. I had a progress bar but it was saying that there are only 250 contacts on the SIM card.
Currently we support only 254 SIM contacts as it's the minimum requirement from our parters.
Status: UNCONFIRMED → NEW
Component: Gaia::Contacts → DOM: Device Interfaces
Ever confirmed: true
Product: Boot2Gecko → Core
QA Contact: isabelrios
Summary: Not all contacts are imported from SIM card → B2G RIL: Support SIM Contacts for more than 1 phonebook.
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Hi, Just fyi. Maximum number of contacts stored in the SIM card depends on type of SIM, although most common is up to 250 contacts. From Telefonica side, it's only requested to be able to import/export contacts from/to SIM card up to 250, so this would not be an issue. Thanks! David
Summary: B2G RIL: Support SIM Contacts for more than 1 phonebook. → B2G RIL: Support SIM Contacts for more than 1 phonebook set.
(In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #4) > Currently we support only 254 SIM contacts as it's the minimum requirement > from our parters. Why can't we support more?
(In reply to Mounir Lamouri (:mounir) from comment #7) > (In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #4) > > Currently we support only 254 SIM contacts as it's the minimum requirement > > from our parters. > > Why can't we support more? This bug is in our TODO list but just not has so much priority, currently we're focus on Multi-SIM, if you can help to speed up that, it will be very appreciated.
(In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #8) > (In reply to Mounir Lamouri (:mounir) from comment #7) > > (In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #4) > > > Currently we support only 254 SIM contacts as it's the minimum requirement > > > from our parters. > > > > Why can't we support more? > > This bug is in our TODO list but just not has so much priority, currently > we're focus on Multi-SIM, if you can help to speed up that, it will be very > appreciated. I understand that this is not done yet and will be done as soon as you guys will have some bandwidth. However, I wonder why the limitation has been set to 254 contacts. Is there more work to do to have more contacts? Does that imply supporting some specific hardware? (the hardware being the sim card in that case)
(In reply to Mounir Lamouri (:mounir) from comment #9) > I understand that this is not done yet and will be done as soon as you guys > will have some bandwidth. However, I wonder why the limitation has been set > to 254 contacts. Is there more work to do to have more contacts? Does that > imply supporting some specific hardware? (the hardware being the sim card in > that case) One phone book set could have several fields : name, number (EF_ADN), additional number (EF_ANR), email (EF_EMAIL), ... etc. Each field (or Elementary File) has at most 254 records (0x00 ~ 0xff, but 0x00 is an invalid record number). In order to support > 254 contacts, we need to read more than 1 phone book sets. Currently we only read 1 phone book set.
Assignee: nobody → allstars.chh
Correct my previous comment: (In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #10) > One phone book set could have several fields : name, number (EF_ADN), > additional number (EF_ANR), email (EF_EMAIL), ... etc. > Each field (or Elementary File) has at most 254 records >(0x00 ~ 0xff, but 0x00 is an invalid record number). and 0xff is also an invalid record number. So the record number ranges from 0x01 ~ 0xfe -> total 254 records.
Comment on attachment 735565 [details] [diff] [review] Part 1: Support more phonebook sets when reading ICC contact Review of attachment 735565 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/ril_worker.js @@ +11392,5 @@ > + if (!pbr.adn) { > + let error = onerror || debug; > + error("Cannot access ADN."); > + return; > + } That's a little bit confusing. Can ADN be omitted?
Attachment #735565 - Flags: review?(vyang)
Attachment #735566 - Flags: review?(vyang) → review+
Move pbr.adn check into parsePbrTlvs.
Attachment #735565 - Attachment is obsolete: true
Attachment #735579 - Flags: review?(vyang) → review+
Comment on attachment 735579 [details] [diff] [review] Part 1: Support more phonebook sets when reading ICC contact. v2 Review of attachment 735579 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/ril_worker.js @@ +11108,5 @@ > > + // EF_ADN is mandatory if and only if DF_PHONEBOOK is present. > + if (!pbr.adn) { > + throw new Error("Cannot access ADN."); > + } Second thought, throw exception here causes more problem in error handling. Some related functions already use onerror callbacks. Can't we return NULL here instead?
Attachment #735579 - Flags: review+
move the pbr.adn check outside parsePbrTlvs and use onerror callback.
Attachment #735579 - Attachment is obsolete: true
Comment on attachment 735660 [details] [diff] [review] Part 1: Support more phonebook sets when reading ICC contact. v3 Addressed comments.
Attachment #735660 - Flags: review?(vyang)
Attachment #735660 - Flags: review?(vyang) → review+
Comment on attachment 735567 [details] [diff] [review] Part 3: Support more phonebook sets when adding ICC contact. Review of attachment 735567 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/ril_worker.js @@ +11298,5 @@ > + if (!pbr.adn) { > + let error = onerror || debug; > + error("Cannot get ADN."); > + return; > + } Should find in next PBR like what you've done below. @@ +11305,5 @@ > + pbr.adn.fileId, > + onsuccess, > + function (errorMsg) { > + findFreeRecordId.bind(this, pbrIndex + 1); > + }.bind(this)); Here.
Attachment #735567 - Flags: review?(vyang)
Attachment #735568 - Flags: review?(vyang) → review+
Comment on attachment 735569 [details] [diff] [review] Part 5: xpcshells tests. Review of attachment 735569 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/tests/test_ril_worker_icc.js @@ +2088,5 @@ > + * Verify ICCContactHelper.updateICCContact with appType is CARD_APPTYPE_USIM. > + */ > +add_test(function test_update_icc_contact() { > + let worker = newUint8Worker(); > + let record = worker.ICCRecordHelper; recordHelper? @@ +2113,5 @@ > + * Verify ICCContactHelper.findFreeICCContact > + */ > +add_test(function test_find_free_icc_contact() { > + let worker = newUint8Worker(); > + let record = worker.ICCRecordHelper; ditto.
Attachment #735569 - Flags: review?(vyang) → review+
Remove the pbr.adn check as we have done this in Part 1 patch.
Attachment #735567 - Attachment is obsolete: true
Attached patch Part 5: xpcshells tests. v2 (obsolete) (deleted) — Splinter Review
Addressed comments.
Attachment #735569 - Attachment is obsolete: true
Attachment #736090 - Flags: review+
check if onerror is defined before calling it.
Attachment #736089 - Attachment is obsolete: true
Comment on attachment 735568 [details] [diff] [review] Part 4: Support more phonebook sets when updating ICC contact. Review of attachment 735568 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/ril_worker.js @@ +11606,5 @@ > + if (!pbr.adn) { > + let error = onerror || debug; > + error("Cannot access ADN."); > + return; > + } I should also remove this.
remove the pbr.adn check.
Attachment #735568 - Attachment is obsolete: true
Attachment #736113 - Flags: review+
Attachment #736092 - Flags: review?(vyang) → review+
Depends on: 847741
No longer depends on: 847714
Rebase. This patch has been r+ by vicamo.
Attachment #735660 - Attachment is obsolete: true
Attachment #744404 - Flags: review+
Rebase. This patch has been r+ by Vicamo.
Attachment #735566 - Attachment is obsolete: true
Attachment #744406 - Flags: review+
Rebase. This patch has been r+ by Vicamo.
Attachment #736092 - Attachment is obsolete: true
Update wrong patch.
Attachment #744407 - Attachment is obsolete: true
Attachment #744411 - Flags: review+
Rebase. This patch has been r+ by Vicamo.
Attachment #736113 - Attachment is obsolete: true
Attachment #744413 - Flags: review+
Attached patch Part 5: xpcshells tests. v3 (deleted) — Splinter Review
Rebase. This patch has been r+ by Vicamo.
Attachment #736090 - Attachment is obsolete: true
Attachment #744415 - Flags: review+
Blocks: 1157082
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: