Closed Bug 901887 Opened 9 years ago Closed 9 years ago

[RIL][Contacts] Saving to SIM doesn't work


(Firefox OS Graveyard :: General, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: arcturus, Assigned: airpingu)




(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #895886 +++

|var request = icc.updateContact('adn', aContact);|

And setting the |onsuccess| and |onerror| on the DOMRequest, we don't go through any of the callbacks.

When enabling the RIL logs we don't get much information, while performing the icc.updateContact we just get:

D/memalloc(  108): /dev/pmem: Allocated buffer base:0x48b00000 size:614400 offset:6144000 fd:80
D/memalloc(  487): /dev/pmem: Mapped buffer base:0x46100000 size:6758400 offset:6144000 fd:34
D/memalloc(  108): /dev/pmem: Allocated buffer base:0x48b00000 size:614400 offset:6758400 fd:104
D/memalloc(  487): /dev/pmem: Mapped buffer base:0x46864000 size:7372800 offset:6758400 fd:43
D/memalloc(  108): /dev/pmem: Allocated buffer base:0x48b00000 size:8192 offset:7372800 fd:111
D/memalloc(  487): /dev/pmem: Mapped buffer base:0x46f86000 size:7380992 offset:7372800 fd:47
D/memalloc(  108): /dev/pmem: Allocated buffer base:0x48b00000 size:8192 offset:7380992 fd:118
D/memalloc(  487): /dev/pmem: Mapped buffer base:0x476a0000 size:7389184 offset:7380992 fd:50
Hi, Francisco 
Can you show me your gaia repository and branch should I can reproduce by myself?
Right, perhaps I'm doing something terrible wrong there :)

Here is how I'm testing:

Go to settings and choose the first export option.

Hi, Francisco
I've tried your branch,
but seems the error is from your gaia app, 
" is undefined",

I try to fix the error,
then exporting is fine,
except it seems the Gaia app doesn't export the correct contact.
(for example, I select contact A, and from ril log, it seems contact B is exported).
I can reproduce this issue. Let me take this. :)
Assignee: nobody → gene.lian
blocking-b2g: --- → koi?
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Attached patch Patch (obsolete) — Splinter Review
This bug is really hard to catch because the console cannot display any error message when contact.anr is not available.

Anyway, we need to add this check to ensure it can be returned eventually because we don't want to update the anr for sure.
Attachment #786980 - Flags: review?(allstars.chh)
Depends on: 859659
Comment on attachment 786980 [details] [diff] [review]

Review of attachment 786980 [details] [diff] [review]:

::: dom/system/gonk/ril_worker.js
@@ +12593,5 @@
>        // Check if contact has additional properties (email, anr, ...etc) need
>        // to be updated as well.
>        if ((field === USIM_PBR_EMAIL && ! ||
> +          (field === USIM_PBR_ANR0 && (!contact.anr || !contact.anr[0]))) {

I think using Array.isArray to check anr is better.
Attachment #786980 - Flags: review?(allstars.chh) → review+
I think we also need to update xpcshell test case to test this.

I'll file another bug to test this.
Bug 902788
Attached patch Patch, V1.1Splinter Review
Thanks Yoshi for the review and providing the test!

Addressing comments. Ready to land.
Attachment #786980 - Attachment is obsolete: true
Attachment #787373 - Flags: review+
Closed: 9 years ago
Resolution: --- → FIXED
blocking-b2g: koi? → ---
You need to log in before you can comment on or make changes to this bug.